From: Ivan Grokhotkov Date: Sat, 18 Mar 2017 09:27:19 +0000 (+0800) Subject: esp32: make soc header compatible with assembler X-Git-Tag: v2.1-rc1~238^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=573cc7d36ff3e4f43bb6f498228cbbb735f9b627;p=esp-idf esp32: make soc header compatible with assembler --- diff --git a/components/esp32/include/soc/soc.h b/components/esp32/include/soc/soc.h index 1b3e35dd47..9b0c82fc1c 100755 --- a/components/esp32/include/soc/soc.h +++ b/components/esp32/include/soc/soc.h @@ -15,7 +15,9 @@ #ifndef _ESP32_SOC_H_ #define _ESP32_SOC_H_ +#ifndef __ASSEMBLER__ #include +#endif //Register Bits{{ #define BIT31 0x80000000 @@ -59,7 +61,11 @@ #define ETS_UNCACHED_ADDR(addr) (addr) #define ETS_CACHED_ADDR(addr) (addr) +#ifndef __ASSEMBLER__ #define BIT(nr) (1UL << (nr)) +#else +#define BIT(nr) (1 << (nr)) +#endif //__ASSEMBLER__ //write value to register #define REG_WRITE(_r, _v) (*(volatile uint32_t *)(_r)) = (_v)