systemconfigdata.h
Go to the documentation of this file.
#define SYSCONF_OFFSET 0
#define EEPROM_offset_NotAlligned SYSCONF_OFFSET+sizeof(systemConfigData)
#define SYSCONF_SIZE EEPROM_offsetJSON
#define EEPROM_offsetJSON EEPROM_offset_NotAlligned + (4 -(EEPROM_offset_NotAlligned & 3))
#define MAXFLASHSTR 32
#define PWDFLASHSTR 16
#define EEPROM_SIGNATURE "LHC1"
#define EEPROM_SIGNATURE_LENGTH 4
//#define EEPROM_offsetJSON IFLASH_PAGE_SIZE
#define EEPROM_FIX_PART_LEN EEPROM_offsetJSON-SYSCONF_OFFSET
const char EEPROM_signature[] = EEPROM_SIGNATURE;
typedef char flashstr[MAXFLASHSTR];
typedef char flashpwd[PWDFLASHSTR];
typedef uint8_t macAddress[6];
#pragma pack(push, 1)
typedef union
{
uint32_t configFlags32bit;
struct
{
uint8_t serialDebugLevel:3;
uint8_t notGetConfigFromHTTP:1;
uint8_t udpDebugLevel:3;
uint8_t notSaveSuccedConfig:1;
uint8_t spare2;
uint16_t sysConfigHash;
};
} systemConfigFlags;
typedef struct
{
char signature[4];
macAddress mac; //6 bytes
uint16_t spare; //2 bytes
systemConfigFlags configFlags; //4 bytes
uint32_t ip;
uint32_t dns;
uint32_t gw;
uint32_t mask;
flashstr configURL;
flashpwd MQTTpwd;
flashpwd OTApwd;
flashstr ETAG;
} systemConfigData;
#pragma (pop)
systemConfigData::configFlags
systemConfigFlags configFlags
Definition: systemconfigdata.h:40
systemConfigFlags
Definition: systemconfigdata.h:22
flashpwd
char flashpwd[PWDFLASHSTR]
Definition: systemconfigdata.h:17
systemConfigFlags::notGetConfigFromHTTP
uint8_t notGetConfigFromHTTP
Definition: systemconfigdata.h:27
systemConfigData::gw
uint32_t gw
Definition: systemconfigdata.h:43
systemConfigData::ip
uint32_t ip
Definition: systemconfigdata.h:41
systemConfigData::configURL
flashstr configURL
Definition: systemconfigdata.h:46
systemConfigFlags::sysConfigHash
uint16_t sysConfigHash
Definition: systemconfigdata.h:31
systemConfigFlags::udpDebugLevel
uint8_t udpDebugLevel
Definition: systemconfigdata.h:28
systemConfigData::mask
uint32_t mask
Definition: systemconfigdata.h:44
MAXFLASHSTR
#define MAXFLASHSTR
Definition: systemconfigdata.h:6
systemConfigFlags::configFlags32bit
uint32_t configFlags32bit
Definition: systemconfigdata.h:23
systemConfigData
Definition: systemconfigdata.h:36
systemConfigData::MQTTpwd
flashpwd MQTTpwd
Definition: systemconfigdata.h:47
systemConfigFlags::notSaveSuccedConfig
uint8_t notSaveSuccedConfig
Definition: systemconfigdata.h:29
systemConfigFlags::serialDebugLevel
uint8_t serialDebugLevel
Definition: systemconfigdata.h:26
systemConfigData::ETAG
flashstr ETAG
Definition: systemconfigdata.h:49
macAddress
uint8_t macAddress[6]
Definition: systemconfigdata.h:18
systemConfigData::mac
macAddress mac
Definition: systemconfigdata.h:38
flashstr
char flashstr[MAXFLASHSTR]
Definition: systemconfigdata.h:16
PWDFLASHSTR
#define PWDFLASHSTR
Definition: systemconfigdata.h:7
EEPROM_SIGNATURE
#define EEPROM_SIGNATURE
Definition: systemconfigdata.h:8
systemConfigData::dns
uint32_t dns
Definition: systemconfigdata.h:42
systemConfigData::spare
uint16_t spare
Definition: systemconfigdata.h:39
systemConfigData::OTApwd
flashpwd OTApwd
Definition: systemconfigdata.h:48
EEPROM_signature
const char EEPROM_signature[]
Definition: systemconfigdata.h:14
systemConfigFlags::spare2
uint8_t spare2
Definition: systemconfigdata.h:30