src.nth.io/

summaryrefslogtreecommitdiff
path: root/main/app_main.c
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2021-03-12 17:35:50 -0600
committerLuke Hoersten <[email protected]>2021-03-12 17:35:50 -0600
commitca72e0e90f850ff5d757be2f6dc658c5d558620c (patch)
tree62c9b43a6647f6bcc4171854c6d8659b188601fc /main/app_main.c
parentd23be047e18ef9b97e5c72073c9236f59ac60d5f (diff)
Removed the event queue. Apparently esp-homekit is thread safe.
Diffstat (limited to 'main/app_main.c')
-rw-r--r--main/app_main.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/main/app_main.c b/main/app_main.c
index ee0a6ad..fd462b4 100644
--- a/main/app_main.c
+++ b/main/app_main.c
@@ -8,7 +8,7 @@
#include <led.h>
#include <lock.h>
#include <bell.h>
-#include <event_queue.h>
+#include <intercom.h>
#define INTERCOM_TASK_PRIORITY 1
#define INTERCOM_TASK_STACKSIZE 4 * 1024
@@ -40,13 +40,6 @@ static void intercom_thread_entry(void *p)
/* Add a dummy Product Data */
uint8_t product_data[] = {'E', 'S', 'P', '3', '2', 'H', 'A', 'P'};
hap_acc_add_product_data(intercom_accessory, product_data, sizeof(product_data));
-
- if (!intercom_event_queue_init())
- {
- ESP_LOGI(TAG, "Failed to initialize event queue");
- return;
- }
-
hap_acc_add_serv(intercom_accessory, intercom_bell_init(CONFIG_HOMEKIT_INTERCOM_BELL_GPIO_PIN));
hap_acc_add_serv(intercom_accessory, intercom_lock_init(CONFIG_HOMEKIT_INTERCOM_LOCK_GPIO_PIN));
intercom_led_init(CONFIG_HOMEKIT_INTERCOM_LED_GPIO_PIN);
@@ -82,7 +75,7 @@ static void intercom_thread_entry(void *p)
hap_start(); /* After all the initializations are done, start the HAP core */
app_wifi_start(portMAX_DELAY); /* Start Wi-Fi */
- intercom_event_queue_run();
+ vTaskDelete(NULL); /* The task ends here. The read/write callbacks will be invoked by the HAP Framework */
}
void app_main()