summaryrefslogtreecommitdiff
path: root/avr/main.c
diff options
context:
space:
mode:
authorLeo C2018-08-20 03:11:20 +0200
committerLeo C2018-08-20 03:11:20 +0200
commit209025e847108189669989a3715667aae4f17b54 (patch)
tree2ece7eb30fe1f51058605d6f6dd657db32a56adb /avr/main.c
parentf766ff54545eab2b2d5dde4b51f4183390b48453 (diff)
downloadz180-stamp-209025e847108189669989a3715667aae4f17b54.zip
Reduce static RAM usage
Diffstat (limited to 'avr/main.c')
-rw-r--r--avr/main.c10
1 files changed, 6 insertions, 4 deletions
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 : "<UNDEFINED>");
+ debug("### main_loop: bootcmd=\"%s\"\n", s ? s : "");
_delay_ms(20);
if (stored_bootdelay != -1 && s && !abortboot(stored_bootdelay)) {