esp_event: move trailing semicolons out of defines

This commit is contained in:
Ivan Grokhotkov 2018-11-19 16:54:57 +08:00
parent 76b39403ad
commit e37b0ad648
5 changed files with 7 additions and 7 deletions

View File

@ -20,8 +20,8 @@ extern "C" {
#endif
// Defines for declaring and defining event base
#define ESP_EVENT_DECLARE_BASE(id) extern esp_event_base_t id;
#define ESP_EVENT_DEFINE_BASE(id) esp_event_base_t id = #id;
#define ESP_EVENT_DECLARE_BASE(id) extern esp_event_base_t id
#define ESP_EVENT_DEFINE_BASE(id) esp_event_base_t id = #id
// Event loop library types
typedef const char* esp_event_base_t; /**< unique pointer to a subsystem that exposes events */

View File

@ -33,7 +33,7 @@
* @brief Define of NMEA Parser Event base
*
*/
ESP_EVENT_DEFINE_BASE(ESP_NMEA_EVENT)
ESP_EVENT_DEFINE_BASE(ESP_NMEA_EVENT);
static const char *GPS_TAG = "nmea_parser";

View File

@ -30,7 +30,7 @@ extern "C" {
* @brief Declare of NMEA Parser Event base
*
*/
ESP_EVENT_DECLARE_BASE(ESP_NMEA_EVENT)
ESP_EVENT_DECLARE_BASE(ESP_NMEA_EVENT);
/**
* @brief GPS fix type

View File

@ -96,7 +96,7 @@ static void timer_stopped_handler(void* handler_args, esp_event_base_t base, int
}
/* Event source task related definitions */
ESP_EVENT_DEFINE_BASE(TASK_EVENTS)
ESP_EVENT_DEFINE_BASE(TASK_EVENTS);
static void task_iteration_handler(void* handler_args, esp_event_base_t base, int32_t id, void* event_data)
{
@ -115,7 +115,7 @@ static void task_event_source(void* args)
// that data passed during event posting is a deep copy of the original data.
ESP_ERROR_CHECK(esp_event_post(TASK_EVENTS, TASK_ITERATION_EVENT, &iteration, sizeof(iteration), portMAX_DELAY));
if (iteration == TASK_ITERATIONS_UNREGISTER){
if (iteration == TASK_ITERATIONS_UNREGISTER) {
ESP_LOGI(TAG, "%s:%s: unregistering task_iteration_handler", TASK_EVENTS, get_id_string(TASK_EVENTS, TASK_ITERATION_EVENT));
ESP_ERROR_CHECK(esp_event_handler_unregister(TASK_EVENTS, TASK_ITERATION_EVENT, task_iteration_handler));
}

View File

@ -31,7 +31,7 @@ static void application_task(void* args)
}
/* Event source task related definitions */
ESP_EVENT_DEFINE_BASE(TASK_EVENTS)
ESP_EVENT_DEFINE_BASE(TASK_EVENTS);
TaskHandle_t g_task;