From fc022332b375492c05fb972defadd7edb238af94 Mon Sep 17 00:00:00 2001 From: paulchilton Date: Sat, 31 Dec 2022 17:06:46 +0000 Subject: [PATCH] Added M5Tough Option --- components/axp192/axp192.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/components/axp192/axp192.cpp b/components/axp192/axp192.cpp index bdd2d11..1378779 100644 --- a/components/axp192/axp192.cpp +++ b/components/axp192/axp192.cpp @@ -18,6 +18,10 @@ void AXP192Component::setup() // disable LDO3 Vibration begin(false, true, false, false, false); } + case AXP192_M5TOUGH: + { + begin(false, false, false, false, false); + } } } @@ -63,6 +67,13 @@ void AXP192Component::begin(bool disableLDO2, bool disableLDO3, bool disableRTC, // Set LDO2 & LDO3(TFT_LED & TFT) 3.0V Write1Byte(0x28, 0xcc); } + case AXP192_M5TOUGH: + { + // Set DCDC3 (TFT_LED & TFT) 3.0V + Write1Byte(0x27, 0xcc); + // Set LDO2 & LDO3(TFT_LED & TFT) 3.0V + Write1Byte(0x28, 0xcc); + } } // Set ADC sample rate to 200hz