diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/drivers_nrf/pstorage/config/pstorage_platform.h b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/drivers_nrf/pstorage/config/pstorage_platform.h index 73540d07d8..2ccca528a6 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/drivers_nrf/pstorage/config/pstorage_platform.h +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/drivers_nrf/pstorage/config/pstorage_platform.h @@ -66,7 +66,10 @@ static __INLINE uint32_t pstorage_flash_page_end() #define PSTORAGE_FLASH_PAGE_END pstorage_flash_page_end() +#ifndef PSTORAGE_NUM_OF_PAGES #define PSTORAGE_NUM_OF_PAGES 1 /**< Number of flash pages allocated for the pstorage module excluding the swap page, configurable based on system requirements. */ +#endif + #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. */ #define PSTORAGE_DATA_START_ADDR ((PSTORAGE_FLASH_PAGE_END - PSTORAGE_NUM_OF_PAGES - 1) \ diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h b/targets/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h index 113fd637fc..b0029bcc25 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h +++ b/targets/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h @@ -67,7 +67,10 @@ static __INLINE uint32_t pstorage_flash_page_end() #define PSTORAGE_FLASH_PAGE_END pstorage_flash_page_end() +#ifndef PSTORAGE_NUM_OF_PAGES #define PSTORAGE_NUM_OF_PAGES 1 /**< Number of flash pages allocated for the pstorage module excluding the swap page, configurable based on system requirements. */ +#endif + #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. */ #define PSTORAGE_DATA_START_ADDR ((PSTORAGE_FLASH_PAGE_END - PSTORAGE_NUM_OF_PAGES - 1) \