/*!
* @def CC2640R2_LAUNCHXL_NVSName
* @brief Enum of NVS names
*/
typedef enum CC2640R2_LAUNCHXL_NVSName {
#ifndef Board_EXCLUDE_NVS_INTERNAL_FLASH
CC2640R2_LAUNCHXL_NVSCC26XX0 = 0,
#endif
#ifndef Board_EXCLUDE_NVS_EXTERNAL_FLASH
CC2640R2_LAUNCHXL_NVSSPI25X0,
#endif
CC2640R2_LAUNCHXL_NVSCOUNT
} CC2640R2_LAUNCHXL_NVSName;
Lease:
回复 Viki Shi:
我使用NVSdrivers的实例,想要写入一些数据到nvs的区域中,但发现CC2640R中只有internal和erternal flash,并没有Board_NVS0,那我该如和设置Board_NVS0。
//
// Open the NVS region specified by the 0th element in the NVS_config[]
// array defined in Board.c.
//
// Use default NVS_Params to open this memory region, hence 'NULL'
//
nvsRegion = NVS_open(Board_NVS0, NULL);
// Confirm that the NVS region opened properly
if (nvsRegion == NULL) {
// Error handling code
}