Commit 74734d23 authored by deroo's avatar deroo
Browse files

better comment out of INIT macro; FLASH_TIGHT added

parent 967eb8bd
......@@ -12,16 +12,25 @@
// the lowest flash address
#define _NANO33BLE_FLASH_BASE (0x0)
// set static unsigned int _flashAddr to one byte after the top of flash
//#define NANO33BLE_FLASH_INIT() \
#define NANO33BLE_FLASH_INIT() \
// private macro: move _flashAddr down by the size of the array being declared
// then make it start on a flash word boundary (the next lowest multiple of 4)
// then make it start on a flash boundary
// boundary is a flash word if FLASH_TIGHT is defined; a flash page otherwise
// cannot be done directly in NANO33BLE_FLASH macro
#define _NANO33BLE_FLASH_DECR_ADDR(_bytesInArray) \
_flashAddr -= (_bytesInArray); \
_flashAddr &= 0xFFFFC;
#define _NANO33BLE_FLASH_DECR_ADDR(_bytesInArray) \
_flashAddr -= (_bytesInArray); \
_flashAddr &= 0xFFFFC;
#define _NANO33BLE_FLASH_DECR_ADDR(_bytesInArray) \
_flashAddr -= (_bytesInArray); \
_flashAddr &= ~(NRF_FICR->CODEPAGESIZE);
// public macro: declare array in flash at highest flash addresses available
// first push _arrayAddr down by size of array in bytes,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment