From d32e50b442424aa8c8618763d9f9851527a8555a Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Tue, 21 Oct 2008 22:49:47 +0200 Subject: avr/module/flash: Tested the find next sector. closes #36 * removed the define to increment the addr. * Update the test. --- digital/avr/modules/flash/flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'digital/avr/modules/flash/flash.c') diff --git a/digital/avr/modules/flash/flash.c b/digital/avr/modules/flash/flash.c index db5645aa..69277266 100644 --- a/digital/avr/modules/flash/flash.c +++ b/digital/avr/modules/flash/flash.c @@ -152,7 +152,7 @@ flash_sector_next (uint32_t addr) /* Search for the next address to start writing. */ for (addr = FLASH_PAGE (addr); (rsp != 0xFF) && (addr < FLASH_ADDRESS_HIGH); - addr += FLASH_PAGE_SIZE - 1) + addr += FLASH_PAGE_SIZE) { rsp = flash_read (addr); } -- cgit v1.2.3