mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-05-01 14:06:41 +00:00
Added ESP32-S2 build
This commit is contained in:
@@ -31,3 +31,18 @@ extra_scripts =
|
|||||||
build_flags =
|
build_flags =
|
||||||
-D WEBSOCKET_DISABLED=1
|
-D WEBSOCKET_DISABLED=1
|
||||||
board_build.f_cpu = 160000000L
|
board_build.f_cpu = 160000000L
|
||||||
|
|
||||||
|
[env:esp32s2]
|
||||||
|
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
|
||||||
|
platform_packages = espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r1
|
||||||
|
board = esp32-s2-saola-1
|
||||||
|
board_build.mcu = esp32s2
|
||||||
|
board_build.variant = esp32s2
|
||||||
|
framework = arduino
|
||||||
|
lib_deps = ${common.lib_deps}
|
||||||
|
lib_ignore = ${common.lib_ignore}
|
||||||
|
extra_scripts =
|
||||||
|
pre:scripts/addversion.py
|
||||||
|
scripts/makeweb.py
|
||||||
|
build_flags =
|
||||||
|
-D WEBSOCKET_DISABLED=1
|
||||||
|
|||||||
@@ -1411,7 +1411,9 @@ void AmsWebServer::configGpioHtml() {
|
|||||||
|
|
||||||
String html = String((const __FlashStringHelper*) GPIO_HTML);
|
String html = String((const __FlashStringHelper*) GPIO_HTML);
|
||||||
|
|
||||||
#if defined(ESP32)
|
#if defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||||
|
html.replace("${gpio.max}", "44");
|
||||||
|
#elif defined(ESP32)
|
||||||
html.replace("${gpio.max}", "39");
|
html.replace("${gpio.max}", "39");
|
||||||
#else
|
#else
|
||||||
html.replace("${gpio.max}", "16");
|
html.replace("${gpio.max}", "16");
|
||||||
@@ -1479,7 +1481,10 @@ String AmsWebServer::getSerialSelectOptions(int selected) {
|
|||||||
} else {
|
} else {
|
||||||
gpioOptions += "<option value=\"3\">UART0 (GPIO3)</option>";
|
gpioOptions += "<option value=\"3\">UART0 (GPIO3)</option>";
|
||||||
}
|
}
|
||||||
#if defined(ESP32)
|
#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};
|
||||||
|
#elif defined(ESP32)
|
||||||
int numGpio = 24;
|
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};
|
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};
|
||||||
if(selected == 9) {
|
if(selected == 9) {
|
||||||
|
|||||||
Reference in New Issue
Block a user