From 7500ab5bbecf67689c5069d2a8ae358b4f75899c Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Tue, 21 Oct 2008 00:19:59 +0200 Subject: 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. --- digital/avr/modules/flash/test/test-flash.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'digital/avr/modules/flash/test/test-flash.c') 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) { -- cgit v1.2.3