1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-16 00:43:00 +03:00

Allow non-aligned PSTR() (#7275)

* Allow non-aligned PSTR()

* Add PSTR4() macro to first 4-bytes aligned PSTR
This commit is contained in:
s-hadinger
2020-05-18 21:21:50 +02:00
committed by GitHub
parent 1b20cd6263
commit 3e4d7c76c4
2 changed files with 20 additions and 5 deletions

View File

@ -48,7 +48,8 @@ void ICACHE_FLASH_ATTR print_stats(int force);
int ICACHE_FLASH_ATTR umm_info_safe_printf_P(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
#define UMM_INFO_PRINTF(fmt, ...) umm_info_safe_printf_P(PSTR(fmt), ##__VA_ARGS__)
#define UMM_INFO_PRINTF(fmt, ...) umm_info_safe_printf_P(PSTR4(fmt), ##__VA_ARGS__)
// use PSTR4() instead of PSTR() to ensure 4-bytes alignment in Flash, whatever the default alignment of PSTR_ALIGN
#endif