mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-21 23:00:39 +08:00
feat(esp8266): Make os_printf equal to printf
Since the string used by printf are put in flash by default. Don't need the old os_printf to define a macro to put string to flash manually.
This commit is contained in:
@ -73,11 +73,7 @@ unsigned long os_random(void);
|
|||||||
int os_get_random(unsigned char *buf, size_t len);
|
int os_get_random(unsigned char *buf, size_t len);
|
||||||
|
|
||||||
#ifndef os_printf
|
#ifndef os_printf
|
||||||
/* NOTE: don't use printf_opt in irq handler, for test */
|
#define os_printf printf
|
||||||
#define os_printf(fmt, ...) do { \
|
|
||||||
static const char flash_str[] ICACHE_RODATA_ATTR STORE_ATTR = fmt; \
|
|
||||||
printf(flash_str, ##__VA_ARGS__); \
|
|
||||||
} while(0)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Note: check_memleak_debug_enable is a weak function inside SDK.
|
/* Note: check_memleak_debug_enable is a weak function inside SDK.
|
||||||
|
@ -63,14 +63,7 @@ extern void vPortFree(void *pv);
|
|||||||
#define ssl_speed_up_enter() system_update_cpu_freq(SYS_CPU_160MHZ)
|
#define ssl_speed_up_enter() system_update_cpu_freq(SYS_CPU_160MHZ)
|
||||||
#define ssl_speed_up_exit() system_update_cpu_freq(SYS_CPU_80MHZ)
|
#define ssl_speed_up_exit() system_update_cpu_freq(SYS_CPU_80MHZ)
|
||||||
|
|
||||||
#ifndef os_printf
|
#define SSL_DEBUG_LOG printf
|
||||||
#define os_printf(fmt, ...) do { \
|
|
||||||
static const char flash_str[] ICACHE_RODATA_ATTR STORE_ATTR = fmt; \
|
|
||||||
printf(flash_str, ##__VA_ARGS__); \
|
|
||||||
} while(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SSL_DEBUG_LOG os_printf
|
|
||||||
|
|
||||||
#define LOCAL_ATRR ICACHE_RODATA_ATTR STORE_ATTR
|
#define LOCAL_ATRR ICACHE_RODATA_ATTR STORE_ATTR
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user