always store constant strings in PROGMEM

master
Stefan Dorn 2016-06-14 00:38:22 +01:00
parent 5a651b2854
commit 0f953d4d4a
1 changed files with 3 additions and 3 deletions

View File

@ -1310,7 +1310,7 @@ void usb_debug_printf(const char *fmt, ...) {
va_list args;
va_start(args, fmt);
vsnprintf(buf, sizeof(buf), fmt, args);
vsnprintf_P(buf, sizeof(buf), fmt, args);
va_end(args);
for (int i = 0; i < sizeof(buf); i++) {
@ -1323,8 +1323,8 @@ void usb_debug_printf(const char *fmt, ...) {
#endif
#ifdef KBD_DEBUG
#define debug_print(s) usb_debug_print(PSTR(s))
#define debug_printf(args...) usb_debug_printf(args)
#define debug_print(s) usb_debug_print(PSTR(s))
#define debug_printf(s, args...) usb_debug_printf(PSTR(s), args)
#else
#define debug_print(s)
#define debug_printf(...)