small flash config improvement plus more comments

Conflicts:
	user/config.c
pull/37/head
Thorsten von Eicken 9 years ago
parent bc063ef71d
commit aa7eadb382
  1. 2
      user/config.c
  2. 4
      user/config.h

@ -17,7 +17,7 @@ FlashConfig flashDefault = {
"esp-link\0 ", // hostname "esp-link\0 ", // hostname
0, 0x00ffffff, 0, // static ip, netmask, gateway 0, 0x00ffffff, 0, // static ip, netmask, gateway
0, // log mode 0, // log mode
0, // swap_uart 0, // swap_uart (don't by default)
1, 0, // tcp_enable, rssi_enable 1, 0, // tcp_enable, rssi_enable
"\0", // api_key "\0", // api_key
}; };

@ -1,6 +1,10 @@
#ifndef CONFIG_H #ifndef CONFIG_H
#define CONFIG_H #define CONFIG_H
// Flash configuration settings. When adding new items always add them at the end and formulate
// them such that a value of zero is an appropriate default or backwards compatible. Existing
// modules that are upgraded will have zero in the new fields. This ensures that an upgrade does
// not wipe out the old settings.
typedef struct { typedef struct {
uint32_t seq; // flash write sequence number uint32_t seq; // flash write sequence number
uint16_t magic, crc; uint16_t magic, crc;

Loading…
Cancel
Save