LightHub 4.6.0
Open-source smart home controller firmware
Loading...
Searching...
No Matches
systemconfigdata.h File Reference

Fixed-layout binary system configuration block stored in flash. More...

Go to the source code of this file.

Classes

union  systemConfigFlags
 Packed 32-bit system configuration flags. More...
struct  systemConfigData
 Fixed-layout system configuration block persisted in flash. More...

Macros

#define SYSCONF_OFFSET   0
 Offset of the system config block in the storage.
#define EEPROM_offset_NotAlligned   SYSCONF_OFFSET+sizeof(systemConfigData)
 End offset of the fixed (unaligned) config block.
#define SYSCONF_SIZE   EEPROM_offsetJSON
 Total size of the fixed config area.
#define EEPROM_offsetJSON   EEPROM_offset_NotAlligned + (4 -(EEPROM_offset_NotAlligned & 3))
 4-byte aligned offset where the JSON config storage starts.
#define MAXFLASHSTR   32
 Max length of flash-stored strings (URLs, ETag).
#define PWDFLASHSTR   16
 Max length of flash-stored passwords.
#define EEPROM_SIGNATURE   "LHC3"
 Signature marking a valid config block.
#define EEPROM_SIGNATURE_LENGTH   4
 Length of the config block signature.
#define EEPROM_FIX_PART_LEN   EEPROM_offsetJSON-SYSCONF_OFFSET

Typedefs

typedef char flashstr[MAXFLASHSTR]
 Fixed-size flash string buffer.
typedef char flashpwd[PWDFLASHSTR]
 Fixed-size flash password buffer.
typedef uint8_t macAddress[6]
 6-byte MAC address.

Variables

const char EEPROM_signature [] = EEPROM_SIGNATURE

Detailed Description

Fixed-layout binary system configuration block stored in flash.

Defines the on-flash layout (systemConfigData) that the systemConfig manager reads/writes: signature, MAC, config flags, static network addresses, config server URL, passwords and the remote-config ETag.

Macro Definition Documentation

◆ EEPROM_FIX_PART_LEN

#define EEPROM_FIX_PART_LEN   EEPROM_offsetJSON-SYSCONF_OFFSET

◆ EEPROM_offset_NotAlligned

#define EEPROM_offset_NotAlligned   SYSCONF_OFFSET+sizeof(systemConfigData)

End offset of the fixed (unaligned) config block.

◆ EEPROM_offsetJSON

#define EEPROM_offsetJSON   EEPROM_offset_NotAlligned + (4 -(EEPROM_offset_NotAlligned & 3))

4-byte aligned offset where the JSON config storage starts.

◆ EEPROM_SIGNATURE

#define EEPROM_SIGNATURE   "LHC3"

Signature marking a valid config block.

◆ EEPROM_SIGNATURE_LENGTH

#define EEPROM_SIGNATURE_LENGTH   4

Length of the config block signature.

◆ MAXFLASHSTR

#define MAXFLASHSTR   32

Max length of flash-stored strings (URLs, ETag).

◆ PWDFLASHSTR

#define PWDFLASHSTR   16

Max length of flash-stored passwords.

◆ SYSCONF_OFFSET

#define SYSCONF_OFFSET   0

Offset of the system config block in the storage.

◆ SYSCONF_SIZE

#define SYSCONF_SIZE   EEPROM_offsetJSON

Total size of the fixed config area.

Typedef Documentation

◆ flashpwd

typedef char flashpwd[PWDFLASHSTR]

Fixed-size flash password buffer.

◆ flashstr

typedef char flashstr[MAXFLASHSTR]

Fixed-size flash string buffer.

◆ macAddress

typedef uint8_t macAddress[6]

6-byte MAC address.

Variable Documentation

◆ EEPROM_signature

const char EEPROM_signature[] = EEPROM_SIGNATURE