mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_timer: perform initialization using ESP_SYSTEM_INIT_FN
(startup.c still calls esp_timer_early_init directly)
This commit is contained in:
parent
42654927d5
commit
bb771fb7c4
@ -447,8 +447,6 @@ static void start_cpu0_default(void)
|
|||||||
|
|
||||||
ESP_SYSTEM_INIT_FN(init_components0, BIT(0), 200)
|
ESP_SYSTEM_INIT_FN(init_components0, BIT(0), 200)
|
||||||
{
|
{
|
||||||
esp_timer_init();
|
|
||||||
|
|
||||||
#if CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND && !CONFIG_PM_SLP_DISABLE_GPIO
|
#if CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND && !CONFIG_PM_SLP_DISABLE_GPIO
|
||||||
// Configure to isolate (disable the Input/Output/Pullup/Pulldown
|
// Configure to isolate (disable the Input/Output/Pullup/Pulldown
|
||||||
// function of the pin) all GPIO pins in sleep state
|
// function of the pin) all GPIO pins in sleep state
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
# affinity_expression: bit map of cores the function is executed on
|
# affinity_expression: bit map of cores the function is executed on
|
||||||
|
|
||||||
|
|
||||||
|
# esp_timer has to be initialized early, since it is used by several other components
|
||||||
|
100: esp_timer_startup_init in components/esp_timer/src/esp_timer.c on BIT(0)
|
||||||
|
|
||||||
# the rest of the components which are initialized from startup.c
|
# the rest of the components which are initialized from startup.c
|
||||||
# [refactor-todo]: move init calls into respective components
|
# [refactor-todo]: move init calls into respective components
|
||||||
200: init_components0 in components/esp_system/startup.c on BIT(0)
|
200: init_components0 in components/esp_system/startup.c on BIT(0)
|
||||||
|
@ -460,6 +460,11 @@ out:
|
|||||||
return ESP_ERR_NO_MEM;
|
return ESP_ERR_NO_MEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ESP_SYSTEM_INIT_FN(esp_timer_startup_init, BIT(0), 100)
|
||||||
|
{
|
||||||
|
return esp_timer_init();
|
||||||
|
}
|
||||||
|
|
||||||
esp_err_t esp_timer_deinit(void)
|
esp_err_t esp_timer_deinit(void)
|
||||||
{
|
{
|
||||||
if (!is_initialized()) {
|
if (!is_initialized()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user