always store constant strings in PROGMEM
parent
5a651b2854
commit
0f953d4d4a
|
@ -1310,7 +1310,7 @@ void usb_debug_printf(const char *fmt, ...) {
|
||||||
|
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vsnprintf(buf, sizeof(buf), fmt, args);
|
vsnprintf_P(buf, sizeof(buf), fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
for (int i = 0; i < sizeof(buf); i++) {
|
for (int i = 0; i < sizeof(buf); i++) {
|
||||||
|
@ -1323,8 +1323,8 @@ void usb_debug_printf(const char *fmt, ...) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef KBD_DEBUG
|
#ifdef KBD_DEBUG
|
||||||
#define debug_print(s) usb_debug_print(PSTR(s))
|
#define debug_print(s) usb_debug_print(PSTR(s))
|
||||||
#define debug_printf(args...) usb_debug_printf(args)
|
#define debug_printf(s, args...) usb_debug_printf(PSTR(s), args)
|
||||||
#else
|
#else
|
||||||
#define debug_print(s)
|
#define debug_print(s)
|
||||||
#define debug_printf(...)
|
#define debug_printf(...)
|
||||||
|
|
Loading…
Reference in New Issue