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) 412 #define NVS_WRITE_ERASE (0x1) 422 #define NVS_WRITE_PRE_VERIFY (0x2) 431 #define NVS_WRITE_POST_VERIFY (0x4) 443 #define NVS_LOCK_WAIT_FOREVER (~(0U)) 448 #define NVS_LOCK_NO_WAIT (0U) 464 #define NVS_REGION_NOT_ADDRESSABLE ((void *)(~(0U))) 521 typedef int_fast16_t (*
NVS_EraseFxn) (NVS_Handle handle,
size_t offset,
546 typedef int_fast16_t (*
NVS_ReadFxn) (NVS_Handle handle,
size_t offset,
547 void *buffer,
size_t bufferSize);
553 typedef int_fast16_t (*
NVS_WriteFxn) (NVS_Handle handle,
size_t offset,
554 void *buffer,
size_t bufferSize,
555 uint_fast16_t flags);
561 typedef int_fast16_t (*
NVS_LockFxn) (NVS_Handle handle, uint32_t timeout);
637 extern void NVS_close(NVS_Handle handle);
658 extern int_fast16_t
NVS_control(NVS_Handle handle, uint_fast16_t cmd, uintptr_t arg);
690 extern int_fast16_t
NVS_erase(NVS_Handle handle,
size_t offset,
size_t size);
741 extern int_fast16_t
NVS_lock(NVS_Handle handle, uint32_t timeout);
782 extern int_fast16_t
NVS_read(NVS_Handle handle,
size_t offset,
void *buffer,
835 extern int_fast16_t
NVS_write(NVS_Handle handle,
size_t offset,
void *buffer,
836 size_t bufferSize, uint_fast16_t flags);
838 #if defined (__cplusplus) void * object
Definition: NVS.h:624
NVS attributes.
Definition: NVS.h:488
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:540
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:478
void(* NVS_GetAttrsFxn)(NVS_Handle handle, NVS_Attrs *attrs)
A function pointer to a driver specific implementation of NVS_getAttrs().
Definition: NVS.h:528
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:521
NVS_CloseFxn closeFxn
Definition: NVS.h:577
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:502
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:508
NVS_GetAttrsFxn getAttrsFxn
Definition: NVS.h:586
void NVS_unlock(NVS_Handle handle)
Function to unlock the NVS driver.
size_t sectorSize
Definition: NVS.h:495
size_t regionSize
Definition: NVS.h:494
struct NVS_Config_ NVS_Config
NVS Global configuration.
NVS_ReadFxn readFxn
Definition: NVS.h:598
void * regionBase
Definition: NVS.h:490
NVS_LockFxn lockFxn
Definition: NVS.h:592
void(* NVS_InitFxn)(void)
A function pointer to a driver specific implementation of NVS_init().
Definition: NVS.h:534
NVS_WriteFxn writeFxn
Definition: NVS.h:604
void NVS_init(void)
Function to initialize the NVS module.
NVS Parameters.
Definition: NVS.h:476
NVS_ControlFxn controlFxn
Definition: NVS.h:580
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:546
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:553
NVS_EraseFxn eraseFxn
Definition: NVS.h:583
NVS_InitFxn initFxn
Definition: NVS.h:589
NVS_FxnTable const * fxnTablePtr
Definition: NVS.h:621
void NVS_close(NVS_Handle handle)
Function to close an NVS_Handle.
NVS_OpenFxn openFxn
Definition: NVS.h:595
void(* NVS_UnlockFxn)(NVS_Handle handle)
A function pointer to a driver specific implementation of NVS_unlock().
Definition: NVS.h:567
int_fast16_t NVS_lock(NVS_Handle handle, uint32_t timeout)
Function to lock the NVS driver.
NVS Global configuration.
Definition: NVS.h:618
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:627
The definition of an NVS function table that contains the required set of functions to control a spec...
Definition: NVS.h:574
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:561
NVS_UnlockFxn unlockFxn
Definition: NVS.h:601
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:514