mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-16 00:33:14 +00:00
Added UART1 HW serial for ESP32-S2
This commit is contained in:
parent
ee12db4f51
commit
ba7915ca7c
@ -608,6 +608,9 @@ void setupHanPort(uint8_t pin, uint32_t baud, uint8_t parityOrdinal, bool invert
|
||||
hwSerial = &Serial2;
|
||||
}
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
if(pin == 18) {
|
||||
hwSerial = &Serial1;
|
||||
}
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -1486,8 +1486,13 @@ String AmsWebServer::getSerialSelectOptions(int selected) {
|
||||
gpioOptions += "<option value=\"3\">UART0 (GPIO3)</option>";
|
||||
}
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
int numGpio = 31;
|
||||
int gpios[] = {4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22,23,25,32,33,34,35,36,39,40,41,42,43,44};
|
||||
int numGpio = 30;
|
||||
int gpios[] = {4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,21,22,23,25,32,33,34,35,36,39,40,41,42,43,44};
|
||||
if(selected == 18) {
|
||||
gpioOptions += "<option value=\"18\" selected>UART1 (GPIO18)</option>";
|
||||
} else {
|
||||
gpioOptions += "<option value=\"18\">UART1 (GPIO18)</option>";
|
||||
}
|
||||
#elif defined(ESP32)
|
||||
int numGpio = 24;
|
||||
int gpios[] = {4,5,6,7,8,10,11,12,13,14,15,17,18,19,21,22,23,25,32,33,34,35,36,39};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user