Skip to content

Commit

Permalink
Fixed AXP2101 Status
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Oct 11, 2023
1 parent aa57c37 commit 2715d95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Micropython/src/AXP2101.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,13 +524,13 @@ def isBatteryConnect(self) -> bool:
return bool(super().getRegisterBit(_AXP2101_STATUS1, 3))

def isBatInActiveModeState(self) -> bool:
return bool(super().getRegisterBit(_AXP2101_STATUS1, 3))
return bool(super().getRegisterBit(_AXP2101_STATUS1, 2))

def getThermalRegulationStatus(self) -> bool:
return super().getRegisterBit(_AXP2101_STATUS1, 2)
return super().getRegisterBit(_AXP2101_STATUS1, 1)

def getCurrnetLimitStatus(self) -> bool:
return super().getRegisterBit(_AXP2101_STATUS1, 1)
return super().getRegisterBit(_AXP2101_STATUS1, 0)

def isCharging(self) -> bool:
return (super().readRegister(_AXP2101_STATUS2)[0] >> 5) == 0x01
Expand Down

0 comments on commit 2715d95

Please sign in to comment.