mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
system_api: return error on repeated registration of shutdown handler
This commit is contained in:
@@ -80,6 +80,11 @@ typedef void (*shutdown_handler_t)(void);
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
esp_err_t esp_register_shutdown_handler(shutdown_handler_t handle);
|
||||
|
||||
|
Reference in New Issue
Block a user