* 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>
18 lines
324 B
C++
18 lines
324 B
C++
#include "variant.h"
|
|
#include <PCA9557.h>
|
|
|
|
PCA9557 io(0x18, &Wire1);
|
|
|
|
void earlyInitVariant()
|
|
{
|
|
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);
|
|
}
|