Added support for s2 mini
This commit is contained in:
parent
47bae4d28e
commit
bbdbf88a76
@ -166,6 +166,38 @@ board_build.embed_txtfiles =
|
||||
html/index.min.htm
|
||||
html/test.min.htm
|
||||
|
||||
[env:gravity32s2-release]
|
||||
framework = ${common_env_data.framework}
|
||||
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
|
||||
${common_env_data.build_flags}
|
||||
-DLOG_LEVEL=0
|
||||
-DCORE_DEBUG_LEVEL=0
|
||||
-DESP32S2
|
||||
-DARDUINO_ESP32S2_DEV
|
||||
-DUSE_SERIAL0
|
||||
lib_deps =
|
||||
${common_env_data.lib_deps}
|
||||
lib_ignore =
|
||||
board = lolin_s2_mini
|
||||
build_type = release
|
||||
board_build.partitions = part32.csv
|
||||
board_build.filesystem = littlefs
|
||||
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:gravity32c3-debug]
|
||||
framework = ${common_env_data.framework}
|
||||
platform = ${common_env_data.platform32}
|
||||
@ -214,34 +246,3 @@ board_build.embed_txtfiles =
|
||||
html/index.min.htm
|
||||
html/test.min.htm
|
||||
|
||||
; [env:gravity32s2-release]
|
||||
; framework = ${common_env_data.framework}
|
||||
; 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
|
||||
; ${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
|
||||
; 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
|
||||
|
@ -148,7 +148,7 @@ class Config {
|
||||
#elif defined(ESP32C3)
|
||||
float _voltageFactor = 1.3;
|
||||
#elif defined(ESP32S2)
|
||||
float _voltageFactor = 1.3;
|
||||
float _voltageFactor = 0.59;
|
||||
#else // ESP32
|
||||
float _voltageFactor = 1.3;
|
||||
#endif
|
||||
|
@ -120,8 +120,7 @@ void checkResetReason() {
|
||||
}
|
||||
|
||||
Log.notice(F("HELP: Last reset cause '%s' (%d)" CR), rStr.c_str(), r);
|
||||
|
||||
#warning "TODO: Implement logging of crashes for esp32"
|
||||
// Havent found a good way to get exception cause from an ESP32
|
||||
#endif
|
||||
}
|
||||
|
||||
|
11
src/main.hpp
11
src/main.hpp
@ -48,7 +48,6 @@ extern RunMode runMode;
|
||||
#elif defined(ESP32C3)
|
||||
#include <FS.h>
|
||||
#include <LittleFS.h>
|
||||
|
||||
#include "esp32c3/rom/rtc.h"
|
||||
#define ESPhttpUpdate httpUpdate
|
||||
#define ESP_RESET ESP.restart
|
||||
@ -60,31 +59,27 @@ extern RunMode runMode;
|
||||
#else
|
||||
#define PIN_SDA 7
|
||||
#define PIN_SCL 6
|
||||
#endif
|
||||
#endif // JTAG_DEBUG
|
||||
#define PIN_DS A3
|
||||
#define PIN_A0 A0
|
||||
// This should be the LED_BUILTIN, but that is also connected SDA (Gyro) so we
|
||||
// cannot use both. So we point LED to pin 8 which is not used.
|
||||
#define PIN_LED 8
|
||||
/*
|
||||
#elif defined(ESP32S2)
|
||||
#include <FS.h>
|
||||
#include <LittleFS.h>
|
||||
|
||||
#include "esp32s2/rom/rtc.h"
|
||||
#define ESPhttpUpdate httpUpdate
|
||||
#define ESP_RESET ESP.restart
|
||||
#define ESP8266WebServer WebServer
|
||||
#define PIN_SDA SDA
|
||||
#define PIN_SCL SCL
|
||||
#define PIN_SDA A17
|
||||
#define PIN_SCL A15
|
||||
#define PIN_DS A8
|
||||
#define PIN_A0 A2
|
||||
#define PIN_LED LED_BUILTIN
|
||||
*/
|
||||
#else // defined (ESP32)
|
||||
#include <FS.h>
|
||||
#include <LittleFS.h>
|
||||
|
||||
#include "esp32/rom/rtc.h"
|
||||
#define ESPhttpUpdate httpUpdate
|
||||
#define ESP_RESET ESP.restart
|
||||
|
@ -90,7 +90,7 @@ void WebServerHandler::webHandleConfig() {
|
||||
#elif defined(ESP32C3)
|
||||
doc[PARAM_PLATFORM] = "esp32c3";
|
||||
#elif defined(ESP32S2)
|
||||
doc[PARAM_PLATFORM] = "esp32s3";
|
||||
doc[PARAM_PLATFORM] = "esp32s2";
|
||||
#else // esp32 mini
|
||||
doc[PARAM_PLATFORM] = "esp32";
|
||||
#endif
|
||||
@ -273,7 +273,7 @@ void WebServerHandler::webHandleStatus() {
|
||||
#elif defined(ESP32C3)
|
||||
doc[PARAM_PLATFORM] = "esp32c3";
|
||||
#elif defined(ESP32S2)
|
||||
doc[PARAM_PLATFORM] = "esp32s3";
|
||||
doc[PARAM_PLATFORM] = "esp32s2";
|
||||
#else // esp32 mini
|
||||
doc[PARAM_PLATFORM] = "esp32";
|
||||
#endif
|
||||
|
@ -61,7 +61,7 @@ Here is an image of where I added the resistor for the voltage divider.
|
||||
ESP32s2 mini
|
||||
++++++++++++
|
||||
|
||||
Work in progress...
|
||||
This is model is now fully supported by gravitymon. Same setup as for ESP32C3 mini.
|
||||
|
||||
ESP32 d1 mini
|
||||
+++++++++++++
|
||||
|
@ -3,6 +3,13 @@
|
||||
Releases
|
||||
########
|
||||
|
||||
v1.2.0 - beta2
|
||||
==============
|
||||
|
||||
Features
|
||||
++++++++
|
||||
* Added support for the ESP32 S2 mini board
|
||||
|
||||
v1.2.0 - beta1
|
||||
==============
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user