Function esp_idf_svc::hal::sys::esp_register_shutdown_handler
source ยท pub unsafe extern "C" fn esp_register_shutdown_handler(
handle: Option<unsafe extern "C" fn()>,
) -> i32
Expand description
@brief Register shutdown handler
This function allows you to register a handler that gets invoked before the application is restarted using esp_restart function. @param handle function to execute on restart @return
- ESP_OK on success
- ESP_ERR_INVALID_STATE if the handler has already been registered
- ESP_ERR_NO_MEM if no more shutdown handler slots are available