diff --git a/src/AXP192.cpp b/src/AXP192.cpp index bccfe0c..449d627 100644 --- a/src/AXP192.cpp +++ b/src/AXP192.cpp @@ -467,4 +467,10 @@ void AXP192::SetLDO2( bool State ) else buf = ~(1<<2) & buf; Write1Byte( 0x12 , buf ); -} \ No newline at end of file +} + +// Cut all power, except for LDO1 (RTC) +void AXP192::PowerOff() +{ + Write1Byte(0x32, Read8bit(0x32) | 0x80); // MSB for Power Off +} diff --git a/src/AXP192.h b/src/AXP192.h index 07078ef..081dd00 100644 --- a/src/AXP192.h +++ b/src/AXP192.h @@ -62,6 +62,9 @@ class AXP192 { void SetCoulombClear(); void SetLDO2( bool State ); + // -- Power Off + void PowerOff(); + public: void Write1Byte( uint8_t Addr , uint8_t Data ); uint8_t Read8bit( uint8_t Addr );