Power off control pin on Thinknode m5 during deepsleep and add RTC (#9510)
* Power off control pin on Thinknode m5 during deepsleep * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Finish HAS_RTC cleanup * Add RTC for Thinknode M5 * Don't double-init Wire * Specify the RTC chip directly rather than use SensorRtcHelper. Saves a bit of flash, and avoid mis-detection --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
GitHub
Copilot
parent
e9d4485bb5
commit
644fa5b54e
@@ -34,3 +34,5 @@ lib_deps = ${esp32s3_base.lib_deps}
|
||||
https://github.com/meshtastic/GxEPD2/archive/a05c11c02862624266b61599b0d6ba93e33c6f24.zip
|
||||
# renovate: datasource=custom.pio depName=PCA9557-arduino packageName=maxpromer/library/PCA9557-arduino
|
||||
maxpromer/PCA9557-arduino@1.0.0
|
||||
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||
lewisxhe/SensorLib@0.3.4
|
||||
@@ -1,12 +1,17 @@
|
||||
#include "variant.h"
|
||||
#include <PCA9557.h>
|
||||
|
||||
PCA9557 io(0x18, &Wire);
|
||||
PCA9557 io(0x18, &Wire1);
|
||||
|
||||
void earlyInitVariant()
|
||||
{
|
||||
Wire.begin(48, 47);
|
||||
Wire1.begin(48, 47);
|
||||
io.pinMode(PCA_PIN_EINK_EN, OUTPUT);
|
||||
io.pinMode(PCA_PIN_POWER_EN, OUTPUT);
|
||||
io.digitalWrite(PCA_PIN_POWER_EN, HIGH);
|
||||
}
|
||||
|
||||
void variant_shutdown()
|
||||
{
|
||||
io.digitalWrite(PCA_PIN_POWER_EN, LOW);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#define I2C_SCL 1
|
||||
#define I2C_SDA 2
|
||||
|
||||
// PCF8563 RTC Module
|
||||
#define PCF8563_RTC 0x51
|
||||
|
||||
// GPS pins
|
||||
#define GPS_SWITH 10
|
||||
#define HAS_GPS 1
|
||||
|
||||
Reference in New Issue
Block a user