riscv-openocd/src/flash
Andrey Yurovsky 08607aefc0 flash: at91samd: fix use of is_erased in check
is_erased can be one of -1, 0, or 1 so it must not be checked like a
boolean value.  In this case we want to erase a page unless we know it's
already erased so we just check for is_erased != 1.

Thanks to Jim Paris for pointing this out on another driver.

Change-Id: I4591186228153b64e5a9608a2aac18745e578d4a
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/2368
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24 22:18:59 +00:00
..
nand flash: declare fixed arrays const 2014-02-06 22:17:51 +00:00
nor flash: at91samd: fix use of is_erased in check 2014-11-24 22:18:59 +00:00
Makefile.am build: add common.mk 2010-11-18 14:05:56 +00:00
common.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
common.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
mflash.c Remove unnecessary (void *) 2013-10-31 20:42:47 +00:00
mflash.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
startup.tcl cfg: add stm32 flash driver alias 2013-06-12 14:44:14 +00:00