pub unsafe extern "C" fn esp_event_handler_instance_unregister_with(
    event_loop: esp_event_loop_handle_t,
    event_base: esp_event_base_t,
    event_id: i32,
    instance: esp_event_handler_instance_t
) -> esp_err_t
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