259 #ifndef ti_drivers_NVS__include 260 #define ti_drivers_NVS__include 266 #if defined(__cplusplus) 287 #define NVS_CMD_RESERVED (32) 301 #define NVS_STATUS_RESERVED (-32) 318 #define NVS_STATUS_SUCCESS (0) 327 #define NVS_STATUS_ERROR (-1) 336 #define NVS_STATUS_UNDEFINEDCMD (-2) 343 #define NVS_STATUS_TIMEOUT (-3) 352 #define NVS_STATUS_INV_OFFSET (-4) 360 #define NVS_STATUS_INV_ALIGNMENT (-5) 369 #define NVS_STATUS_INV_SIZE (-6) 378 #define NVS_STATUS_INV_WRITE (-7) 386 #define NVS_STATUS_VERIFYBUFFER (-8) 419 #define NVS_WRITE_ERASE (0x1) 429 #define NVS_WRITE_PRE_VERIFY (0x2) 438 #define NVS_WRITE_POST_VERIFY (0x4) 450 #define NVS_LOCK_WAIT_FOREVER (~(0U)) 455 #define NVS_LOCK_NO_WAIT (0U) 471 #define NVS_REGION_NOT_ADDRESSABLE ((void *)(~(0U))) 521 typedef int_fast16_t (*
NVS_ControlFxn)(NVS_Handle handle, uint_fast16_t cmd, uintptr_t arg);
527 typedef int_fast16_t (*
NVS_EraseFxn)(NVS_Handle handle,
size_t offset,
size_t size);
551 typedef int_fast16_t (*
NVS_ReadFxn)(NVS_Handle handle,
size_t offset,
void *buffer,
size_t bufferSize);
557 typedef int_fast16_t (
558 *
NVS_WriteFxn)(NVS_Handle handle,
size_t offset,
void *buffer,
size_t bufferSize, uint_fast16_t flags);
564 typedef int_fast16_t (*
NVS_LockFxn)(NVS_Handle handle, uint32_t timeout);
640 extern void NVS_close(NVS_Handle handle);
661 extern int_fast16_t
NVS_control(NVS_Handle handle, uint_fast16_t cmd, uintptr_t arg);
693 extern int_fast16_t
NVS_erase(NVS_Handle handle,
size_t offset,
size_t size);
744 extern int_fast16_t
NVS_lock(NVS_Handle handle, uint32_t timeout);
785 extern int_fast16_t
NVS_read(NVS_Handle handle,
size_t offset,
void *buffer,
size_t bufferSize);
840 extern int_fast16_t
NVS_write(NVS_Handle handle,
size_t offset,
void *buffer,
size_t bufferSize, uint_fast16_t flags);
842 #if defined(__cplusplus) ADC_Params params
Definition: Driver_Init.h:11
void * object
Definition: NVS.h:627
NVS attributes.
Definition: NVS.h:495
NVS_Handle(* NVS_OpenFxn)(uint_least8_t index, NVS_Params *params)
A function pointer to a driver specific implementation of NVS_open().
Definition: NVS.h:545
int_fast16_t NVS_control(NVS_Handle handle, uint_fast16_t cmd, uintptr_t arg)
Function performs implementation specific features on a given NVS_Handle.
void * custom
Definition: NVS.h:485
void(* NVS_GetAttrsFxn)(NVS_Handle handle, NVS_Attrs *attrs)
A function pointer to a driver specific implementation of NVS_getAttrs().
Definition: NVS.h:533
int_fast16_t(* NVS_EraseFxn)(NVS_Handle handle, size_t offset, size_t size)
A function pointer to a driver specific implementation of NVS_erase().
Definition: NVS.h:527
NVS_CloseFxn closeFxn
Definition: NVS.h:580
int_fast16_t NVS_write(NVS_Handle handle, size_t offset, void *buffer, size_t bufferSize, uint_fast16_t flags)
Write data to the NVS region associated with the NVS_Handle.
struct NVS_Config_ * NVS_Handle
A handle that is returned from the NVS_open() call.
Definition: NVS.h:509
NVS_Handle NVS_open(uint_least8_t index, NVS_Params *params)
Open an NVS region for reading and writing.
void NVS_Params_init(NVS_Params *params)
Function to initialize the NVS_Params struct to its defaults.
int_fast16_t NVS_erase(NVS_Handle handle, size_t offset, size_t size)
Erase size bytes of the region beginning at offset bytes from the base of the region referenced by th...
void(* NVS_CloseFxn)(NVS_Handle handle)
A function pointer to a driver specific implementation of NVS_close().
Definition: NVS.h:515
NVS_GetAttrsFxn getAttrsFxn
Definition: NVS.h:589
void NVS_unlock(NVS_Handle handle)
Function to unlock the NVS driver.
size_t sectorSize
Definition: NVS.h:502
size_t regionSize
Definition: NVS.h:501
int_fast16_t(* NVS_WriteFxn)(NVS_Handle handle, size_t offset, void *buffer, size_t bufferSize, uint_fast16_t flags)
A function pointer to a driver specific implementation of NVS_write().
Definition: NVS.h:558
struct NVS_Config_ NVS_Config
NVS Global configuration.
NVS_ReadFxn readFxn
Definition: NVS.h:601
void * regionBase
Definition: NVS.h:497
NVS_LockFxn lockFxn
Definition: NVS.h:595
void(* NVS_InitFxn)(void)
A function pointer to a driver specific implementation of NVS_init().
Definition: NVS.h:539
NVS_WriteFxn writeFxn
Definition: NVS.h:607
void NVS_init(void)
Function to initialize the NVS module.
NVS Parameters.
Definition: NVS.h:483
NVS_ControlFxn controlFxn
Definition: NVS.h:583
int_fast16_t(* NVS_ReadFxn)(NVS_Handle handle, size_t offset, void *buffer, size_t bufferSize)
A function pointer to a driver specific implementation of NVS_read().
Definition: NVS.h:551
NVS_EraseFxn eraseFxn
Definition: NVS.h:586
NVS_InitFxn initFxn
Definition: NVS.h:592
NVS_FxnTable const * fxnTablePtr
Definition: NVS.h:624
void NVS_close(NVS_Handle handle)
Function to close an NVS_Handle.
NVS_OpenFxn openFxn
Definition: NVS.h:598
void(* NVS_UnlockFxn)(NVS_Handle handle)
A function pointer to a driver specific implementation of NVS_unlock().
Definition: NVS.h:570
int_fast16_t NVS_lock(NVS_Handle handle, uint32_t timeout)
Function to lock the NVS driver.
NVS Global configuration.
Definition: NVS.h:621
int_fast16_t NVS_read(NVS_Handle handle, size_t offset, void *buffer, size_t bufferSize)
Read data from the NVS region associated with the NVS_Handle.
void NVS_getAttrs(NVS_Handle handle, NVS_Attrs *attrs)
Function to get the NVS attributes.
void const * hwAttrs
Definition: NVS.h:630
The definition of an NVS function table that contains the required set of functions to control a spec...
Definition: NVS.h:577
int_fast16_t(* NVS_LockFxn)(NVS_Handle handle, uint32_t timeout)
A function pointer to a driver specific implementation of NVS_lock().
Definition: NVS.h:564
NVS_UnlockFxn unlockFxn
Definition: NVS.h:604
int_fast16_t(* NVS_ControlFxn)(NVS_Handle handle, uint_fast16_t cmd, uintptr_t arg)
A function pointer to a driver specific implementation of NVS_control().
Definition: NVS.h:521