mirror of https://github.com/jeelabs/esp-link.git
parent
279da6dcef
commit
03819576cf
@ -0,0 +1,20 @@ |
||||
/* Configuration stored in flash */ |
||||
|
||||
#include <esp8266.h> |
||||
#include <osapi.h> |
||||
#include "config.h" |
||||
#include "espfs.h" |
||||
|
||||
FlashConfig flashConfig = { |
||||
MCU_RESET_PIN, MCU_ISP_PIN, LED_CONN_PIN, LED_SERIAL_PIN, |
||||
115200, |
||||
"esp-link\0 ", |
||||
}; |
||||
|
||||
bool ICACHE_FLASH_ATTR configSave(void) { |
||||
return true; |
||||
} |
||||
|
||||
bool ICACHE_FLASH_ATTR configRestore(void) { |
||||
return true; |
||||
} |
@ -0,0 +1,14 @@ |
||||
#ifndef CONFIG_H |
||||
#define CONFIG_H |
||||
|
||||
typedef struct { |
||||
int8_t reset_pin, isp_pin, conn_led_pin, ser_led_pin; |
||||
int32_t baud_rate; |
||||
char hostname[32]; |
||||
} FlashConfig; |
||||
extern FlashConfig flashConfig; |
||||
|
||||
bool configSave(void); |
||||
bool configRestore(void); |
||||
|
||||
#endif |
Loading…
Reference in new issue