From e37b0ad648483df05fde9ab0a3944ea25ee57026 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 19 Nov 2018 16:54:57 +0800 Subject: [PATCH] esp_event: move trailing semicolons out of defines --- components/esp_event/include/esp_event_base.h | 4 ++-- examples/peripherals/uart/nmea0183_parser/main/nmea_parser.c | 2 +- examples/peripherals/uart/nmea0183_parser/main/nmea_parser.h | 2 +- examples/system/esp_event/default_event_loop/main/main.c | 4 ++-- examples/system/esp_event/user_event_loops/main/main.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/esp_event/include/esp_event_base.h b/components/esp_event/include/esp_event_base.h index d2fd380428..73bc73be85 100644 --- a/components/esp_event/include/esp_event_base.h +++ b/components/esp_event/include/esp_event_base.h @@ -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 */ diff --git a/examples/peripherals/uart/nmea0183_parser/main/nmea_parser.c b/examples/peripherals/uart/nmea0183_parser/main/nmea_parser.c index eaa69d278b..0dc244afe2 100644 --- a/examples/peripherals/uart/nmea0183_parser/main/nmea_parser.c +++ b/examples/peripherals/uart/nmea0183_parser/main/nmea_parser.c @@ -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"; diff --git a/examples/peripherals/uart/nmea0183_parser/main/nmea_parser.h b/examples/peripherals/uart/nmea0183_parser/main/nmea_parser.h index 498b2e6f93..aaf802ef61 100644 --- a/examples/peripherals/uart/nmea0183_parser/main/nmea_parser.h +++ b/examples/peripherals/uart/nmea0183_parser/main/nmea_parser.h @@ -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 diff --git a/examples/system/esp_event/default_event_loop/main/main.c b/examples/system/esp_event/default_event_loop/main/main.c index 5af9e52c92..0564be6414 100644 --- a/examples/system/esp_event/default_event_loop/main/main.c +++ b/examples/system/esp_event/default_event_loop/main/main.c @@ -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)); } diff --git a/examples/system/esp_event/user_event_loops/main/main.c b/examples/system/esp_event/user_event_loops/main/main.c index a604ff0510..b47fed5812 100644 --- a/examples/system/esp_event/user_event_loops/main/main.c +++ b/examples/system/esp_event/user_event_loops/main/main.c @@ -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; -- 2.40.0