mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-21 23:00:39 +08:00
feat(esp8266): Add rtc related attribute
This commit is contained in:
@ -38,4 +38,12 @@
|
|||||||
// Use as ets_printf(DRAM_STR("Hello world!\n"));
|
// Use as ets_printf(DRAM_STR("Hello world!\n"));
|
||||||
#define DRAM_STR(str) (__extension__({static const DRAM_ATTR char __c[] = (str); (const char *)&__c;}))
|
#define DRAM_STR(str) (__extension__({static const DRAM_ATTR char __c[] = (str); (const char *)&__c;}))
|
||||||
|
|
||||||
|
// Forces data into RTC memory.
|
||||||
|
// Any variable marked with this attribute will keep its value
|
||||||
|
// during a deep sleep / wake cycle.
|
||||||
|
#define RTC_DATA_ATTR __attribute__((section(".rtc.data")))
|
||||||
|
|
||||||
|
// Forces read-only data into RTC memory.
|
||||||
|
#define RTC_RODATA_ATTR __attribute__((section(".rtc.rodata")))
|
||||||
|
|
||||||
#endif /* __ESP_ATTR_H__ */
|
#endif /* __ESP_ATTR_H__ */
|
||||||
|
Reference in New Issue
Block a user