3#include "espressif/esp8266.h"
12 char apcredentials[ESP_AP_NAME_SIZE];
23 char sensorserver[64];
37 uint32_t powermodeflags;
38 uint16_t wifioff_duration;
39 uint16_t radiooff_duration;
40 uint16_t sleep_duration;
41 uint16_t nonsleep_duration;
43 uint32_t guaranteed_to_be_zero0;
44 uint32_t guaranteed_to_be_zero1;
45 uint32_t guaranteed_to_be_zero2;
46 uint32_t guaranteed_to_be_zero3;
47 uint32_t guaranteed_to_be_zero4;
48 uint32_t guaranteed_to_be_zero5;
53#define CONFIG_FLAGS_LEDEXTERN 0
54#define CONFIG_FLAGS_RADIODISABLE 1
55#define CONFIG_FLAGS_TEMP212 2
56#define CONFIG_FLAGS_WIFI_DISABLE 3
57#define CONFIG_FLAGS_TEMP211 4
58#define CONFIG_FLAGS_TEMP207 5
60#define CONFIG_FLAGS_SENSORS_DISABLED 6
62#define CONFIG_FLAGS_INTERNAL_LED_INVERTED 7
63#define CONFIG_FLAGS_ROUTING_ENABLED 8
64#define CONFIG_FLAGS_POWER_SAVE 9
65#define CONFIG_FLAGS_UDP_ENABLED 10
66#define CONFIG_FLAGS_START_USERAPP_ON_BOOT 11
67#define CONFIG_FLAGS_WHITE_MOSFET0 12
68#define CONFIG_FLAGS_WHITE_MOSFET1 13
69#define CONFIG_FLAGS_ESP_COMSYNC 14
70#define CONFIG_FLAGS_CLOCKSYNC_DISABLED 15
73#define CONFIG_POWERFLAG_THROTTLE 0
76int flash_config_init();
83int config_get_quickstart();
84void config_set_quickstart(
int b);
87int config_get_sensors_enabled();
88void config_set_sensors_enabled(
int b);
90int config_get_owdisable();
91void config_set_owdisable(
int b);
93void config_set_wifidisable(
int b);
94int config_get_wifidisable();
96void config_set_wifidetected(
int b);
97int config_get_wifidetected();
99void config_set_ti1101disable(
int b);
100int config_get_ti1101disable();
101void config_set_ssid(
const char *ssid);
102const char *config_get_ssid();
103void config_set_wireless_pw(
const char *pw);
104const char *config_get_wireless_pw();
107void config_set_flashmode(
byte b);
109int config_is_valid();
111int config_is_ram_valid();
112const char *config_get_cloud_token();
113void config_set_cloud_token(
const char *token);
115long config_get_log_node();
116void config_set_log_node(
long nodeid);
117byte config_get_flag(
int flag);
118void config_set_flag(
int flag,
byte value);
119uint32_t config_get_flags();
120void config_flag_line(
const char *line);
121const char *config_get_sensor_server();
122void config_set_sensor_server(
const char *name);
123const char *config_get_cloud_server();
124void config_set_cloud_server(
const char *name);
125void config_set_moduleid(uint64_t modid);
126uint64_t config_get_moduleid();
128void config_set_userapp(uint32_t userapp_base);
130int get_user_config_flag(
int flag);
131uint32_t get_user_config_flags();
132void set_user_config_flag(
int flag,
int value);
133void set_user_config_flags(uint32_t flags);
134uint32_t config_get_clock_mul();
135uint32_t config_get_clock_div();
136void config_set_clock_mul(uint32_t mul);
137void config_set_clock_div(uint32_t div);
138void config_set_timezone(uint32_t tz);
139uint32_t config_get_timezone();
140int config_get_powermode_flag(
int b);
141void config_set_powermode_flags(uint32_t new_flags);
142uint32_t config_get_powermode_flags();
143void config_set_radiooff_duration(uint16_t dur);
144uint16_t config_get_radiooff_duration();
145uint16_t config_get_wifioff_duration();
146void config_set_wifioff_duration(uint16_t wifioff);
this must be implemented by the userapp, stored in flash at the beginning of the file (offset 0)