| LightHub v4.0.0 Smarthome controller firmware

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