Merge branch 'feature/os_printf_equal_to_printf' into 'master'

feat(esp8266): Make os_printf equal to printf

See merge request sdk/ESP8266_RTOS_SDK!179
This commit is contained in:
Wu Jian Gang
2018-05-24 10:58:39 +08:00
6 changed files with 22 additions and 40 deletions

View File

@ -73,11 +73,7 @@ unsigned long os_random(void);
int os_get_random(unsigned char *buf, size_t len);
#ifndef os_printf
/* NOTE: don't use printf_opt in irq handler, for test */
#define os_printf(fmt, ...) do { \
static const char flash_str[] ICACHE_RODATA_ATTR STORE_ATTR = fmt; \
printf(flash_str, ##__VA_ARGS__); \
} while(0)
#define os_printf printf
#endif
/* Note: check_memleak_debug_enable is a weak function inside SDK.