|
esp_iot_framework
v0.1.0-alpha
© 2026 AmakeSasha, distributed under a license Apache-2.0
|
System hooks for application business logic. More...
Typedefs | |
| typedef esp_err_t(* | eif_handler_system_t) (void) |
| Prototype for system-level lifecycle event handlers. | |
Functions | |
| esp_err_t | eif_register_handler_system_reboot (eif_handler_system_t handler) |
| Register a handler for the system reboot event. More... | |
These functions are the primary interface for linking the final product's business logic with system lifecycle events. They allow the application to execute specific tasks in direct response to internal state changes.
| esp_err_t eif_register_handler_system_reboot | ( | eif_handler_system_t | handler | ) |
This function hooks a custom handler into the system teardown process. It is the final safety net that triggers right before the system reset, allowing you to "park" your hardware or commit last-second logs.
CONFIG_EIF_REBOOT_TASK_STACK_SIZE). Avoid deep recursion or allocation of a large amount of memory (stack or heap).eif_register_handler_ip_lost(), ESP-IDF event: IP_EVENT_STA_LOST_IP) event and disable the Wi-Fi stack. This function must be called after eif_core_initialize().CORE.| handler | Pointer to the function to execute. Cannot be NULL. |
ESP_OK: Handler registered successfully.ESP_ERR_INVALID_ARG: The handler pointer is NULL.Example of use: