soc: put hal function to get core id in IRAM

pull/4784/head
Renz Bagaporo 2020-03-24 22:47:34 +08:00
rodzic bd827a4d2f
commit d5085010c8
2 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -15,6 +15,8 @@
#include <stdint.h>
#include "esp_attr.h"
#include "soc/cpu_caps.h"
#include "xt_instr_macros.h"
@ -27,7 +29,7 @@
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 (

Wyświetl plik

@ -12,9 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include <stdint.h>
#include "esp_attr.h"
#include "soc/cpu_caps.h"
#include "xt_instr_macros.h"
@ -27,7 +28,7 @@
extern "C" {
#endif
static inline int cpu_ll_get_core_id(void)
static inline int IRAM_ATTR cpu_ll_get_core_id(void)
{
return 0;
}