TI-RTOS Drivers
tidrivers_tivac_2_16_01_13
|
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
struct | NVSTiva_CmdSetCopyBlockArgs |
NVSTiva command structure for setting copy block. More... | |
struct | NVSTiva_HWAttrs |
NVSTiva attributes. More... | |
struct | NVSTiva_Object |
Macros | |
#define | NVSTiva_STATUS_ECOPYBLOCK (NVS_STATUS_RESERVED - 0) |
Alignment error returned by NVSTiva_control(). More... | |
#define | NVSTiva_CMD_SET_COPYBLOCK NVS_CMD_RESERVED + 0 |
Command to set the copy block for an NVS block. More... | |
Typedefs | |
typedef struct NVSTiva_CmdSetCopyBlockArgs | NVSTiva_CmdSetCopyBlockArgs |
NVSTiva command structure for setting copy block. More... | |
typedef struct NVSTiva_HWAttrs | NVSTiva_HWAttrs |
NVSTiva attributes. More... | |
typedef struct NVSTiva_Object | NVSTiva_Object |
Variables | |
const NVS_FxnTable | NVSTiva_fxnTable |
typedef struct NVSTiva_CmdSetCopyBlockArgs NVSTiva_CmdSetCopyBlockArgs |
NVSTiva command structure for setting copy block.
This structure is used to hold the copy block information that is passed to NVS_control(). If copyBlock is a buffer in RAM, isRam should be set to TRUE. If copyBlock is in Flash, set isRam to FALSE.
typedef struct NVSTiva_HWAttrs NVSTiva_HWAttrs |
NVSTiva attributes.
The block is the address of a region in flash of size blockSize bytes.
For TM4C129x devices, the smallest erase page size is 16KB, so in most cases, blockSize should be set to 16KB for this device. If the blockSize is less than the page size, care should be taken not to use the rest of the page. A write to the block will cause the entire page to be erased! A blockSize greater than the page size is not supported. The page size for the device can be obtained through NVS_getAttrs().
When the block is written to, a scratch region is needed to preserve the unmodified data in the block. This scratch region, referred to as copyBlock, can be a page in flash or a buffer in RAM. The application can set copyBlock in the HWAttrs directly, if it is known at compile time, or set copyBlock through NVS_control(), for example, if it is allocated on the heap. The copyBlock can be shared accross multiple NVS instances. It is up to the application to ensure that copyBlock is set before the first call to NVS_write(). Using a blockSize less than the page size decreases RAM or heap only if copyBlock is not in flash.
typedef struct NVSTiva_Object NVSTiva_Object |
const NVS_FxnTable NVSTiva_fxnTable |