Netcruzer Library API  V2.03
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
CFG_COPY Struct Reference

#include <nz_appConfig.h>

Data Fields

BYTE IncNum
 
WORD Address
 
BYTE Size
 
BYTE CRC
 
BYTE Data [26]
 
BYTE IncNumPlusOne
 

Detailed Description

Config Copy

Each time a setting is updated, it is first written to the CFG_COPY structure. On startup, appConfig will check if the last entry(s) in this area is(are) consistent with value in EEPROM. Only whole 32 byte blocks are used. The format of each 32 byte block is:

  • 0: Incrementing number, even number from 0 to 254.
  • 1-2: Setting address in External EEPROM (0xfffe indicates multiple blocks to follow)
  • 3: Size of Data. If larger than 26, consecutive blocks are used.
  • 4: CRC
  • 5-30 Data, max of 26 bytes
  • 31: Incrementing number + 1

On startup, appConfig will look for 32 byte block with last "Incrementing number". To confirm contents is valid, last byte of block must be "Incrementing number + 1" - this indicates that whole block was successfully written. Maximum data is 26 bytes. If more is required, consecutive blocks are used. Following is possible:

--— Single Block -—

  • Setting Address gives address of setting, size has value from 1-26. All data contained in single block

--— Multiple Blocks, Non-Contiguous data -—

  • First block contains NO data! Address=0xfffe. Size=number of blocks to follow with data.
  • Following blocks are normal "Single Block". For data to be valid, ensure all following blocks are there!

The documentation for this struct was generated from the following file: