diff options
| author | Ayke van Laethem <aykevanlaethem@gmail.com> | 2018-07-22 20:11:32 +0200 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-07-23 16:12:33 +1000 |
| commit | 7067ac3573de38b0070d4086fa5ff4de5e47f9ee (patch) | |
| tree | e36709c6d370f3fb557812909b1446f6e4b92c14 | |
| parent | 6a31dcd6388b28e94c549f0d5bbe4a706b713c7b (diff) | |
nrf/drivers/flash: Fix incorrect page alignment check.
| -rw-r--r-- | ports/nrf/drivers/flash.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/nrf/drivers/flash.h b/ports/nrf/drivers/flash.h index 0b341c39a..7e6fff37a 100644 --- a/ports/nrf/drivers/flash.h +++ b/ports/nrf/drivers/flash.h @@ -38,7 +38,7 @@ #error Unknown chip #endif -#define FLASH_IS_PAGE_ALIGNED(addr) ((uint32_t)(addr) & (FLASH_PAGESIZE - 1)) +#define FLASH_IS_PAGE_ALIGNED(addr) (((uint32_t)(addr) & (FLASH_PAGESIZE - 1)) == 0) #if BLUETOOTH_SD |
