mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
hal: put cpu_ll_get_core_id to IRAM
This commit is contained in:
parent
9e7d2c0065
commit
1f9629da9f
@ -30,7 +30,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
static inline int cpu_ll_get_core_id(void)
|
||||
static inline int IRAM_ATTR cpu_ll_get_core_id(void)
|
||||
{
|
||||
#if SOC_CPU_CORES_NUM == 1
|
||||
return 0; // No need to check core ID on single core hardware
|
||||
|
@ -21,13 +21,14 @@
|
||||
#include "xtensa/config/specreg.h"
|
||||
#include "xtensa/config/extreg.h"
|
||||
#include "esp_bit_defs.h"
|
||||
#include "esp_attr.h"
|
||||
#include "xtensa/config/core.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
static inline int cpu_ll_get_core_id(void)
|
||||
static inline int IRAM_ATTR cpu_ll_get_core_id(void)
|
||||
{
|
||||
uint32_t id;
|
||||
asm volatile (
|
||||
|
Loading…
x
Reference in New Issue
Block a user