Browse Source

Fix assert to check flash programming offset

The assert introduced in 00c8648351 checks
whether the programming offset equals to page_size of the flash, while it
wants to check whether the offset is a multiple of the page_size.

Change-Id: I794d021951a28c1cc520b5eea5d500f097721b06
Signed-off-by: Attila Kinali <attila@kinali.ch>
Reviewed-on: http://openocd.zylin.com/482
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
tags/v0.6.0-rc1
Attila Kinali 12 years ago
committed by Spencer Oliver
parent
commit
cea4842207
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/flash/nor/at91sam3.c

+ 1
- 1
src/flash/nor/at91sam3.c View File

@@ -2845,7 +2845,7 @@ static int sam3_write(struct flash_bank *bank,

/* By checking that offset is correct here, we also
fix a clang warning */
assert(offset == pPrivate->page_size);
assert(offset % pPrivate->page_size == 0);

/* intermediate large pages */
/* also - the final *terminal* */


Loading…
Cancel
Save