From 209025e847108189669989a3715667aae4f17b54 Mon Sep 17 00:00:00 2001 From: Leo C Date: Mon, 20 Aug 2018 03:11:20 +0200 Subject: Reduce static RAM usage --- avr/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'avr/main.c') diff --git a/avr/main.c b/avr/main.c index 450e2ba..1fba3cb 100644 --- a/avr/main.c +++ b/avr/main.c @@ -67,15 +67,17 @@ void print_reset_reason(void) uint8_t r = mcusr & 0x1f; const FLASH char * const FLASH *p = rreasons; - printf_P(PSTR("### Reset reason(s): %s"), r ? "" : "none"); + my_puts_P(PSTR("### Reset reason(s): ")); + if (r == 0) + my_puts_P(PSTR("none")); for ( ; r; p++, r >>= 1) { if (r & 1) { my_puts_P(*p); if (r & ~1) - printf_P(PSTR(", ")); + my_puts_P(PSTR(", ")); } } - printf_P(PSTR(".\n")); + my_puts_P(PSTR(".\n")); } #endif @@ -223,7 +225,7 @@ const char *bootdelay_process(void) static void autoboot_command(const char *s) { - debug("### main_loop: bootcmd=\"%s\"\n", s ? s : ""); + debug("### main_loop: bootcmd=\"%s\"\n", s ? s : ""); _delay_ms(20); if (stored_bootdelay != -1 && s && !abortboot(stored_bootdelay)) { -- cgit v1.2.3