Can not figure out esp_event_base , and event_id are known in default event loop example
Posted: Fri Nov 19, 2021 4:32 pm
Hello,
I am going through the example default_event_loop example from the examples directory
and I don't understand how esp_event_base and event_id variables are chosen in the example.
I would think that there was a list of each variable for each esp32 component, but I can
not find one.
I guess I am trying to figure out what links actual events to these variables ?
These variables are used in both registering a callback and the handler itself.
For example, to register an instance of a handler function this function is used
I am going through the example default_event_loop example from the examples directory
and I don't understand how esp_event_base and event_id variables are chosen in the example.
I would think that there was a list of each variable for each esp32 component, but I can
not find one.
I guess I am trying to figure out what links actual events to these variables ?
These variables are used in both registering a callback and the handler itself.
For example, to register an instance of a handler function this function is used
Code: Select all
esp_err_t esp_event_handler_instance_register(esp_event_base_t event_base,
int32_t event_id,
esp_event_handler_t event_handler,
void *event_handler_arg,
esp_event_handler_instance_t *context)