esp32: Make 'restart' function independent of Wi-Fi

Restart being a lower-layer system-level function, needn't depend on
the higher level Wi-Fi libraries.

This also enables us to get rid of one more WIFI_ENABLED ifdef check
This commit is contained in:
Kedar Sovani
2017-08-07 16:00:46 +05:30
parent a41b1a9d1f
commit 159e7e81b4
3 changed files with 30 additions and 11 deletions

View File

@@ -49,6 +49,15 @@ void system_init(void) __attribute__ ((deprecated));
*/
void system_restore(void) __attribute__ ((deprecated));
typedef void (*shutdown_handler_t)(void);
/**
* @brief Register shutdown handler
*
* This function allows you to register a handler that gets invoked before a
* systematic shutdown of the chip.
*/
esp_err_t esp_register_shutdown_handler(shutdown_handler_t handle);
/**
* @brief Restart PRO and APP CPUs.
*