Skip to content

Commit 1be7418

Browse files
authored
Merge pull request #3836 from cuvva/master
Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os
2 parents 05e7aad + c4a979e commit 1be7418

File tree

2 files changed

+6
-0
lines changed
  • features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/drivers_nrf/pstorage/config
  • targets/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config

2 files changed

+6
-0
lines changed

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/drivers_nrf/pstorage/config/pstorage_platform.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ static __INLINE uint32_t pstorage_flash_page_end()
6666

6767
#define PSTORAGE_FLASH_PAGE_END pstorage_flash_page_end()
6868

69+
#ifndef PSTORAGE_NUM_OF_PAGES
6970
#define PSTORAGE_NUM_OF_PAGES 1 /**< Number of flash pages allocated for the pstorage module excluding the swap page, configurable based on system requirements. */
71+
#endif
72+
7073
#define PSTORAGE_MIN_BLOCK_SIZE 0x0010 /**< Minimum size of block that can be registered with the module. Should be configured based on system requirements, recommendation is not have this value to be at least size of word. */
7174

7275
#define PSTORAGE_DATA_START_ADDR ((PSTORAGE_FLASH_PAGE_END - PSTORAGE_NUM_OF_PAGES - 1) \

targets/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ static __INLINE uint32_t pstorage_flash_page_end()
6767

6868
#define PSTORAGE_FLASH_PAGE_END pstorage_flash_page_end()
6969

70+
#ifndef PSTORAGE_NUM_OF_PAGES
7071
#define PSTORAGE_NUM_OF_PAGES 1 /**< Number of flash pages allocated for the pstorage module excluding the swap page, configurable based on system requirements. */
72+
#endif
73+
7174
#define PSTORAGE_MIN_BLOCK_SIZE 0x0010 /**< Minimum size of block that can be registered with the module. Should be configured based on system requirements, recommendation is not have this value to be at least size of word. */
7275

7376
#define PSTORAGE_DATA_START_ADDR ((PSTORAGE_FLASH_PAGE_END - PSTORAGE_NUM_OF_PAGES - 1) \

0 commit comments

Comments
 (0)