The following are the sequence of steps to use PDS in the application:
pds_interface.h
in the applicationPdsFileMarks_t
and update the
fields. The maximum size combining all the elements in
PdsFileMarks_t
is 256 bytes. PdsFileMarks_t
represents the data to be stored in one NVM row,
which is 256 bytes. So, additional instances of the PdsFileMarks_t
structure are created when the size of all the elements exceeds 256 bytes.PdsFileMarks_t
and append it
in the enum list PdsFileItemIdx_t
available in file
pds_interface.h
.ItemMap_t
, according the number of elements to be stored.
Ensure the elements have File ID in the MSB byte of the 16-bit data as shown in
Figure 3. Macro DECLARE_ITEM()
shown in
Figure 2 assigns appropriate value to the
ItemMap_t
structure and it is declared in the
pds_interface.h
. The third parameter to the macro function is
the element value and it has the File ID in the MSB. The macro function masks the
File ID and assigns the element value to the structure element.PdsFileMarks_t
with the File ID and
the instance name.