fix(esp_timer): avoid signed integer overflow in ESP_SYSTEM_INIT_FN

CONFIG_ESP_TIMER_ISR_AFFINITY can be equal to -1, whereas
ESP_SYSTEM_INIT_FN takes an uint16_t argument. To avoid overflow,
move the choice of init mask into source code and set the value
explicitly.
This commit is contained in:
Ivan Grokhotkov
2023-11-25 02:25:20 +01:00
parent 75c92c3a66
commit 6046b396ac
3 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ CORE: 170: init_xt_wdt in components/esp_system/startup_funcs.c on BIT(0)
########### SECONDARY startup stage ###########
# esp_timer has to be initialized early, since it is used by several other components
SECONDARY: 100: esp_timer_startup_init in components/esp_timer/src/esp_timer.c on CONFIG_ESP_TIMER_ISR_AFFINITY
SECONDARY: 100: esp_timer_startup_init in components/esp_timer/src/esp_timer.c on ESP_TIMER_INIT_MASK
# HW stack guard via assist-debug module.
SECONDARY: 101: esp_hw_stack_guard_init in components/esp_system/hw_stack_guard.c on ESP_SYSTEM_INIT_ALL_CORES