Function esp_idf_svc::sys::esp_event_handler_instance_unregister_with
source ยท pub unsafe extern "C" fn esp_event_handler_instance_unregister_with(
event_loop: *mut c_void,
event_base: *const i8,
event_id: i32,
instance: *mut c_void,
) -> i32
Expand description
@brief 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 arguments 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.
@param[in] event_loop the event loop with which to unregister this handler function, must not be NULL @param[in] event_base the base of the event with which to unregister the handler @param[in] event_id the ID of the event with which to unregister the handler @param[in] instance the instance object of the registration to be unregistered
@return
- ESP_OK: Success
- ESP_ERR_INVALID_ARG: Invalid combination of event base and event ID
- Others: Fail