mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(system_init): introduce pre-scheduler and pre-app main handler registrations
- Added macros for registering handlers to run before the scheduler and app main. - Updated various components to utilize the new registration system for initialization. - Refactored app startup logic to streamline initialization sequence.
This commit is contained in:
@@ -3,6 +3,21 @@ System
|
||||
|
||||
:link_to_translation:`zh_CN:[中文]`
|
||||
|
||||
FreeRTOS
|
||||
---------
|
||||
|
||||
The legacy ``port_start_app_hook`` is deprecated and will be removed in ESP-IDF v7.0. To preserve the previous execution order, replace it with an ``ESP_PRE_SCHEDULER_HANDLER_REGISTER`` handler at priority ``999``.
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#include "esp_private/esp_sys_event_app_init.h"
|
||||
|
||||
ESP_PRE_SCHEDULER_HANDLER_REGISTER(port_start_app_hook, 999)
|
||||
{
|
||||
// Port-specific startup behavior
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
OTA Updates
|
||||
-----------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user