SG RFID nRF51822 fork
Fork of nRF51822 by
Revision 93:0e7a9efee6d7, committed 2015-01-21
- Comitter:
- rgrover1
- Date:
- Wed Jan 21 10:01:17 2015 +0000
- Parent:
- 92:8c1553b39b03
- Child:
- 94:2bac1b3c5cfc
- Commit message:
- Synchronized with git rev e4fab54b
Author: Rohit Grover
include the pstorage module in the nRF port.
Changed in this revision
--- a/btle/btle.cpp Wed Jan 21 10:01:16 2015 +0000 +++ b/btle/btle.cpp Wed Jan 21 10:01:17 2015 +0000 @@ -55,9 +55,7 @@ static void sys_evt_dispatch(uint32_t sys_evt) { -#if NEED_PSTORAGE /* disabled by default */ pstorage_sys_event_handler(sys_evt); -#endif } error_t btle_init(void)
--- a/nordic/app_common/pstorage.cpp Wed Jan 21 10:01:16 2015 +0000 +++ b/nordic/app_common/pstorage.cpp Wed Jan 21 10:01:17 2015 +0000 @@ -10,8 +10,6 @@ * */ -#if NEED_PSTORAGE /* disabled by default */ - #include "pstorage.h" #include <stdlib.h> #include <stdint.h> @@ -19,7 +17,7 @@ #include "nordic_common.h" #include "nrf_error.h" #include "nrf_assert.h" -#include "nrf.h" +// #include "nrf.h" #include "nrf_soc.h" #include "app_util.h" @@ -1120,6 +1118,4 @@ return retval; } -#endif // PSTORAGE_RAW_MODE_ENABLE - -#endif /* #if NEED_PSTORAGE */ +#endif // PSTORAGE_RAW_MODE_ENABLE \ No newline at end of file
--- a/nordic/pstorage_platform.h Wed Jan 21 10:01:16 2015 +0000 +++ b/nordic/pstorage_platform.h Wed Jan 21 10:01:17 2015 +0000 @@ -20,7 +20,6 @@ #define PSTORAGE_PL_H__ #include <stdint.h> -#include "nordic_global.h" #ifdef __cplusplus extern "C" { @@ -35,15 +34,16 @@ : NRF_FICR->CODESIZE) -#define PSTORAGE_MAX_APPLICATIONS 2 /**< Maximum number of applications that can be registered with the module, configurable based on system requirements. */ +#define PSTORAGE_MAX_APPLICATIONS 1 /**< Maximum number of applications that can be registered with the module, configurable based on system requirements. */ #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_MAX_APPLICATIONS) \ +#define PSTORAGE_DATA_START_ADDR ((PSTORAGE_FLASH_PAGE_END - PSTORAGE_MAX_APPLICATIONS - 1) \ * PSTORAGE_FLASH_PAGE_SIZE) /**< Start address for persistent data, configurable according to system requirements. */ -#define PSTORAGE_DATA_END_ADDR (PSTORAGE_FLASH_PAGE_END * PSTORAGE_FLASH_PAGE_SIZE) /**< End address for persistent data, configurable according to system requirements. */ +#define PSTORAGE_DATA_END_ADDR ((PSTORAGE_FLASH_PAGE_END - 1) * PSTORAGE_FLASH_PAGE_SIZE) /**< End address for persistent data, configurable according to system requirements. */ +#define PSTORAGE_SWAP_ADDR PSTORAGE_DATA_END_ADDR /**< Top-most page is used as swap area for clear and update. */ #define PSTORAGE_MAX_BLOCK_SIZE PSTORAGE_FLASH_PAGE_SIZE /**< Maximum size of block that can be registered with the module. Should be configured based on system requirements. And should be greater than or equal to the minimum size. */ -#define PSTORAGE_CMD_QUEUE_SIZE 30 /**< Maximum number of flash access commands that can be maintained by the module for all applications. Configurable. */ +#define PSTORAGE_CMD_QUEUE_SIZE 10 /**< Maximum number of flash access commands that can be maintained by the module for all applications. Configurable. */ /** Abstracts persistently memory block identifier. */ @@ -67,4 +67,4 @@ #endif // PSTORAGE_PL_H__ /** @} */ -/** @endcond */ +/** @endcond */ \ No newline at end of file