summaryrefslogtreecommitdiffhomepage
path: root/digital/avr/modules/flash/test/test-flash.c
diff options
context:
space:
mode:
authorNélio Laranjeiro2008-10-21 00:19:59 +0200
committerNélio Laranjeiro2008-10-21 00:19:59 +0200
commit7500ab5bbecf67689c5069d2a8ae358b4f75899c (patch)
tree47a39814ac44d1d7384fb6c4e38a34335b882005 /digital/avr/modules/flash/test/test-flash.c
parent7b6d93e0a1cbc9f629e8c817660496739e2dff39 (diff)
avr/module/flash: Closes #34
* Removed the flah context. * split the page search to know the next page usable. (to debug) * Added a new case in the flash test.
Diffstat (limited to 'digital/avr/modules/flash/test/test-flash.c')
-rw-r--r--digital/avr/modules/flash/test/test-flash.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/digital/avr/modules/flash/test/test-flash.c b/digital/avr/modules/flash/test/test-flash.c
index 546ce71b..aea03e44 100644
--- a/digital/avr/modules/flash/test/test-flash.c
+++ b/digital/avr/modules/flash/test/test-flash.c
@@ -86,6 +86,11 @@ proto_callback (uint8_t cmd, uint8_t size, uint8_t *args)
* - 1b: byte. */
flash_write (addr, args[3]);
break;
+ case c ('p', 0):
+ /* Find the next page to write. */
+ addr = flash_sector_next ();
+ proto_send3b ('p', addr >> 16, addr >> 8, addr);
+ break;
default:
if (cmd == 'w' && size > 4)
{