summaryrefslogtreecommitdiff
path: root/digital/avr/modules/flash/test
diff options
context:
space:
mode:
authorNélio Laranjeiro2009-03-01 12:08:20 +0100
committerNélio Laranjeiro2009-03-01 12:08:20 +0100
commit4d53ce59cdc998471981e78825d85bd4cfe37b50 (patch)
tree7cfed27022c709e83050476e822d774b58253b1c /digital/avr/modules/flash/test
parentba98e932657a6a8f9d5139a571bb77ef5de1beca (diff)
digital/avr/modules/flash:
Added in the initialize part of the dump memory the possibility to find where is the last trace.
Diffstat (limited to 'digital/avr/modules/flash/test')
-rw-r--r--digital/avr/modules/flash/test/Makefile3
-rw-r--r--digital/avr/modules/flash/test/flash-dump.c10
2 files changed, 10 insertions, 3 deletions
diff --git a/digital/avr/modules/flash/test/Makefile b/digital/avr/modules/flash/test/Makefile
index aec41f98..33ad8001 100644
--- a/digital/avr/modules/flash/test/Makefile
+++ b/digital/avr/modules/flash/test/Makefile
@@ -1,7 +1,8 @@
BASE = ../../..
-AVR_PROGS = test-flash
+AVR_PROGS = test-flash flash_dump
test-flash_SOURCES = test-flash.c
+flash_dump_SOURCES = flash-dump.c
MODULES = utils spi flash proto uart
CONFIGFILE = avrconfig.h
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);