From 15d33714379f444246bb966a2323bce16c3cefe5 Mon Sep 17 00:00:00 2001 From: Magnus Persson Date: Wed, 12 Oct 2022 23:26:17 +0200 Subject: [PATCH] Updated pins for new boards --- .github/workflows/pio-build.yaml | 2 +- platformio.ini | 85 +++++++++++++------------------- src/main.hpp | 34 +++++++++++-- 3 files changed, 63 insertions(+), 58 deletions(-) diff --git a/.github/workflows/pio-build.yaml b/.github/workflows/pio-build.yaml index 73aafce..5630f5f 100644 --- a/.github/workflows/pio-build.yaml +++ b/.github/workflows/pio-build.yaml @@ -36,7 +36,7 @@ jobs: git config --global advice.detachedHead false - name: Run PlatformIO - run: pio run -e gravity-release -e gravity-perf -e gravity32-release -e gravity32-perf -e gravity32-c3-release + run: pio run -e gravity-release -e gravity-perf -e gravity32-release -e gravity32-c3-release - uses: EndBug/add-and-commit@v7 # You can change this to use a specific version. https://github.com/marketplace/actions/add-commit with: diff --git a/platformio.ini b/platformio.ini index 30a0d6a..3780370 100644 --- a/platformio.ini +++ b/platformio.ini @@ -103,24 +103,6 @@ board = ${common_env_data.board} build_type = release board_build.filesystem = littlefs -[env:gravity-perf] -upload_speed = ${common_env_data.upload_speed} -monitor_speed = ${common_env_data.monitor_speed} -framework = ${common_env_data.framework} -platform = ${common_env_data.platform} -extra_scripts = ${common_env_data.extra_scripts} -build_unflags = ${common_env_data.build_unflags} -build_flags = - ${common_env_data.build_flags} - -DCOLLECT_PERFDATA - -DLOG_LEVEL=5 -lib_deps = - https://github.com/mp-se/incbin # https://github.com/graphitemaster/incbin - ${common_env_data.lib_deps} -board = ${common_env_data.board} -build_type = release -board_build.filesystem = littlefs - [env:gravity32-release] framework = arduino platform = ${common_env_data.platform32} @@ -140,39 +122,6 @@ lib_deps = lib_ignore = board = featheresp32 build_type = release -#board_build.partitions = min_spiffs.csv -board_build.partitions = part32.csv -board_build.filesystem = littlefs -monitor_filters = esp32_exception_decoder -board_build.embed_txtfiles = - html/calibration.min.htm - html/config.min.htm - html/firmware.min.htm - html/format.min.htm - html/about.min.htm - html/index.min.htm - html/test.min.htm - -[env:gravity32-perf] -framework = arduino -platform = ${common_env_data.platform32} -upload_speed = ${common_env_data.upload_speed} -monitor_speed = ${common_env_data.monitor_speed} -extra_scripts = ${common_env_data.extra_scripts} -build_unflags = - ${common_env_data.build_unflags} -build_flags = - -Wl,-Map,output.map - #-DCORE_DEBUG_LEVEL=0 - ${common_env_data.build_flags} - -DCOLLECT_PERFDATA - -DLOG_LEVEL=5 -lib_deps = - ${common_env_data.lib_deps} - ${common_env_data.lib_deps32} -board = featheresp32 -build_type = release -#board_build.partitions = min_spiffs.csv board_build.partitions = part32.csv board_build.filesystem = littlefs monitor_filters = esp32_exception_decoder @@ -213,7 +162,6 @@ lib_deps = lib_ignore = board = lolin_c3_mini build_type = debug -#board_build.partitions = min_spiffs.csv board_build.partitions = part32.csv board_build.filesystem = littlefs monitor_filters = esp32_exception_decoder @@ -225,3 +173,36 @@ board_build.embed_txtfiles = html/about.min.htm html/index.min.htm html/test.min.htm + +; [env:gravity32-s2-release] +; framework = arduino +; platform = ${common_env_data.platform32} +; upload_speed = 115200 +; monitor_speed = ${common_env_data.monitor_speed} +; extra_scripts = ${common_env_data.extra_scripts} +; build_unflags = +; ${common_env_data.build_unflags} +; build_flags = +; -Wl,-Map,output.map +; ${common_env_data.build_flags} +; -DLOG_LEVEL=5 +; -DCORE_DEBUG_LEVEL=0 +; -DESP32S2 +; -DARDUINO_ESP32S2_DEV +; lib_deps = +; ${common_env_data.lib_deps} +; ${common_env_data.lib_deps32} +; lib_ignore = +; board = lolin_s2_mini +; build_type = debug +; board_build.partitions = part32.csv +; board_build.filesystem = littlefs +; monitor_filters = esp32_exception_decoder +; board_build.embed_txtfiles = +; html/calibration.min.htm +; html/config.min.htm +; html/firmware.min.htm +; html/format.min.htm +; html/about.min.htm +; html/index.min.htm +; html/test.min.htm diff --git a/src/main.hpp b/src/main.hpp index 05277a4..d67531f 100644 --- a/src/main.hpp +++ b/src/main.hpp @@ -45,17 +45,41 @@ extern RunMode runMode; #define PIN_DS D6 #define PIN_LED 2 // #define PIN_A0 A0 +#elif defined(ESP32C3) +#include +#include +#define ESPhttpUpdate httpUpdate +#define ESP_RESET ESP.restart +#define ESP8266WebServer WebServer +#define PIN_SDA SDA +#define PIN_SCL SCL +#define PIN_DS A3 +#define PIN_A0 A0 +#define PIN_LED LED_BUILTIN +/* +#elif defined(ESP32S2) +#include +#include +#define ESPhttpUpdate httpUpdate +#define ESP_RESET ESP.restart +#define ESP8266WebServer WebServer +#define PIN_SDA SDA +#define PIN_SCL SCL +#define PIN_DS A8 +#define PIN_A0 A2 +#define PIN_LED LED_BUILTIN +*/ #else // defined (ESP32) #include #include #define ESPhttpUpdate httpUpdate #define ESP_RESET ESP.restart #define ESP8266WebServer WebServer -#define PIN_SDA 17 -#define PIN_SCL 16 -#define PIN_DS 19 -#define PIN_A0 36 -#define PIN_LED 2 +#define PIN_SDA TX +#define PIN_SCL RX +#define PIN_DS MISO +#define PIN_A0 A4 +#define PIN_LED LED_BUILTIN #endif #define PIN_LED 2