From 4d53ce59cdc998471981e78825d85bd4cfe37b50 Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Sun, 1 Mar 2009 12:08:20 +0100 Subject: digital/avr/modules/flash: Added in the initialize part of the dump memory the possibility to find where is the last trace. --- digital/avr/modules/flash/test/flash-dump.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'digital/avr/modules/flash/test/flash-dump.c') diff --git a/digital/avr/modules/flash/test/flash-dump.c b/digital/avr/modules/flash/test/flash-dump.c index c2bc6106..6a622ac5 100644 --- a/digital/avr/modules/flash/test/flash-dump.c +++ b/digital/avr/modules/flash/test/flash-dump.c @@ -34,7 +34,6 @@ void proto_callback (uint8_t cmd, uint8_t size, uint8_t *args) { /* May be unused. */ - uint32_t addr = v8_to_v32 (0, args[0], args[1], args[2]); uint8_t status; #define c(cmd, size) (cmd << 8 | size) switch (c (cmd, size)) @@ -45,14 +44,21 @@ proto_callback (uint8_t cmd, uint8_t size, uint8_t *args) break; default: if (cmd == 'l') + { status = flash_log (size, args); if (!status) + { /* Error */ proto_send0('?'); + return; + } + } else + { /* Error */ proto_send0 ('?'); - return; + return; + } } /* Acknowledge what has been done */ proto_send (cmd, size, args); -- cgit v1.2.3