pub unsafe extern "C" fn esp_event_handler_unregister(
    event_base: esp_event_base_t,
    event_id: i32,
    event_handler: esp_event_handler_t
) -> esp_err_t
Expand description

@brief Unregister a handler with the system event loop (legacy).

Unregisters a handler, so it will no longer be called during dispatch. Handlers can be unregistered for any combination of event_base and event_id which were previously registered. To unregister a handler, the event_base and event_id arguments must match exactly the arguments passed to esp_event_handler_register() when that handler was registered. Passing ESP_EVENT_ANY_BASE and/or ESP_EVENT_ANY_ID will only unregister handlers 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_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] event_handler the handler to unregister

@return ESP_OK success @return ESP_ERR_INVALID_ARG invalid combination of event base and event ID @return others fail