EasyManua.ls Logo

Espressif ESP32-S2 - Page 853

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
esp_err_t esp_event_handler_unregister_with(esp_event_loop_handle_t event_loop,
esp_event_base_t event_base, int32_t event_id,
esp_event_handler_t event_handler)
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 is obsolete and will be deprecated soon, please use
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
event_loop, esp_event_base_t
event_base, int32_t event_id,
esp_event_handler_instance_t
instance)
Unregister a handler instance from a specific event loop.
Unregisters a handler instance so it will no longer be called during dispatch. Handler instances can
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 event_base, int32_t
event_id, esp_event_handler_instance_t
instance)
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 842
Submit Document Feedback
Release v4.4

Table of Contents