summaryrefslogtreecommitdiff
path: root/digital/avr/modules/flash/test
diff options
context:
space:
mode:
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);