mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-19 23:45:28 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user