Chapter 2. API Reference
esp_err_t esp_event_handler_unregister_with(esp_event_loop_handle_t
Unregister a handler from a specific event loop (legacy).
This function behaves in the same manner as esp_event_handler_unregister, except the additional specification
of the event loop to unregister the handler with.
Note This
function
esp_event_handler_instance_unregister_with() instead.
Return
• ESP_OK: Success
• ESP_ERR_INVALID_ARG: Invalid combination of event base and event id
• Others: Fail
Parameters
• [in] event_loop: the event loop with which to unregister this handler function, must not be
NULL
• [in] event_base: the base of the event with which to unregister the handler
• [in] event_id: the id of the event with which to unregister the handler
• [in] event_handler: the handler to unregister
esp_err_t esp_event_handler_instance_unregister_with(esp_event_loop_handle_t
Unregister a handler instance from a specific event loop.
Unregisters a handler instance so it will no longer be called during dispatch.
be unregistered for any combination of event_base and event_id which were previously registered. To
unregister a handler instance, the event_base and event_id arguments must match exactly the argu-
ments passed to esp_event_handler_instance_register() when that handler instance was registered. Passing
ESP_EVENT_ANY_BASE and/or ESP_EVENT_ANY_ID will only unregister handler instances that were
registered with the same wildcard arguments.
Note When using ESP_EVENT_ANY_ID, handlers registered to specific event IDs using the same base will
not be unregistered. When using ESP_EVENT_ANY_BASE, events registered to specific bases will
also not be unregistered. This avoids accidental unregistration of handlers registered by other users or
components.
Return
• ESP_OK: Success
• ESP_ERR_INVALID_ARG: Invalid combination of event base and event id
• Others: Fail
Parameters
• [in] event_loop: the event loop with which to unregister this handler function, must not be
NULL
• [in] event_base: the base of the event with which to unregister the handler
• [in] event_id: the id of the event with which to unregister the handler
• [in] instance: the instance object of the registration to be unregistered
esp_err_t esp_event_handler_instance_unregister(esp_event_base_t
Unregister a handler from the system event loop.
This function does the same as esp_event_handler_instance_unregister_with, except that it unregisters the
handler instance from the default event loop.
Return
• ESP_OK: Success
• ESP_ERR_INVALID_ARG: Invalid combination of event base and event id
• Others: Fail
Espressif Systems
is
obsolete
and
842
Submit Document Feedback
esp_event_base_t
event_base, int32_t event_id,
esp_event_handler_t
event_handler)
will
be
deprecated
event_loop,
event_base,
esp_event_handler_instance_t
instance)
event_id,
esp_event_handler_instance_t
instance)
event_loop,
soon,
please
use
esp_event_base_t
int32_t
event_id,
Handler instances can
event_base,
int32_t
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers