Fix our esp_event_send() implementation.

This commit is contained in:
Johny Mattsson 2016-09-29 18:21:18 +10:00
parent f9bf50cf03
commit e355057de6
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ typedef struct {
nodemcu_esp_event_cb callback; nodemcu_esp_event_cb callback;
} nodemcu_esp_event_reg_t; } nodemcu_esp_event_reg_t;
extern nodemcu_esp_event_reg_t *esp_event_cb_table; extern nodemcu_esp_event_reg_t esp_event_cb_table;
#define NODEMCU_ESP_EVENT(evcode, func) \ #define NODEMCU_ESP_EVENT(evcode, func) \
static const LOCK_IN_SECTION(".esp_event_cb_table") \ static const LOCK_IN_SECTION(".esp_event_cb_table") \

View File

@ -73,7 +73,7 @@ static void handle_esp_event (task_param_t param, task_prio_t prio)
NODE_ERR("default event handler failed for %d", evt.event_id); NODE_ERR("default event handler failed for %d", evt.event_id);
nodemcu_esp_event_reg_t *evregs; nodemcu_esp_event_reg_t *evregs;
for (evregs = esp_event_cb_table; evregs->callback; ++evregs) for (evregs = &esp_event_cb_table; evregs->callback; ++evregs)
{ {
if (evregs->event_id == evt.event_id) if (evregs->event_id == evt.event_id)
evregs->callback (&evt); evregs->callback (&evt);