mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-02 08:01:43 +01:00
soc: prefer assertions, disabling functions for cpu abstractions
Prefer assertions, making available functions only when caps support it for cpu-related abstractions. Changes cpu hal functions to stall, unstall, reset to not accept -1; instead prefering macros that provide the same functionality.
This commit is contained in:
@@ -23,17 +23,22 @@
|
||||
#include "hal/cpu_types.h"
|
||||
|
||||
#include "hal/soc_hal.h"
|
||||
#include "soc/soc_caps.h"
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
void IRAM_ATTR esp_cpu_stall(int cpu_id)
|
||||
{
|
||||
#if SOC_CPU_CORES_NUM > 1
|
||||
soc_hal_stall_core(cpu_id);
|
||||
#endif
|
||||
}
|
||||
|
||||
void IRAM_ATTR esp_cpu_unstall(int cpu_id)
|
||||
{
|
||||
#if SOC_CPU_CORES_NUM > 1
|
||||
soc_hal_unstall_core(cpu_id);
|
||||
#endif
|
||||
}
|
||||
|
||||
void IRAM_ATTR esp_cpu_reset(int cpu_id)
|
||||
|
||||
Reference in New Issue
Block a user