GPIO used to enter setup in now configurable
This commit is contained in:
parent
ae77a7a8ee
commit
286844dd6d
@ -190,8 +190,8 @@ void setup() {
|
||||
|
||||
// Get GPIO 3 Status
|
||||
Serial.swap(); //Switch Serial on GPIO 13 & 15
|
||||
pinMode(3, INPUT_PULLUP);
|
||||
int txStatus = digitalRead(3);
|
||||
pinMode(CONFIG_SETUP_GPIO, INPUT_PULLUP);
|
||||
int txStatus = digitalRead(CONFIG_SETUP_GPIO);
|
||||
#ifndef CONFIG_ENABLE_EXTRA_GPIO
|
||||
Serial.swap(); // Switch back on GPIO 1 & 3
|
||||
#endif
|
||||
|
@ -46,3 +46,7 @@
|
||||
#ifndef CONFIG_EEPROM_SIZE
|
||||
#define CONFIG_EEPROM_SIZE 256
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SETUP_GPIO
|
||||
#define CONFIG_SETUP_GPIO 3
|
||||
#endif
|
||||
|
@ -30,6 +30,8 @@
|
||||
|
||||
|
||||
/* DEFAULT VALUE ALSO DEFINED IN CONFIG.H */
|
||||
//If this GPIO is LOW at boot, device will enter setup mode
|
||||
//#define CONFIG_SETUP_GPIO 3
|
||||
|
||||
// Time to sleep between 2 webserver request (increase it reduce battery usage but increase latency)
|
||||
//#define CONFIG_WEB_DELAY_MS 100
|
||||
|
Loading…
Reference in New Issue
Block a user