Skip to content

Commit

Permalink
update axp driver
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitshaoxiang committed Feb 4, 2024
1 parent 5a23ea4 commit 87845d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/AXP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ void AXP::begin() {
ina3221.begin(&Wire1);
axp2101.set_lcd_back_light_voltage(3000);
axp2101.set_lcd_and_tf_voltage(3300);
if (ina3221.getVoltage(INA3221_CH2) > 4.5f)
axp2101.set_bus_5v(false);
else {
axp2101.set_bus_5v(true);
}
axp2101.set_bus_5v(true);
axp2101.set_sys_led(true);
} else {
Expand Down
2 changes: 0 additions & 2 deletions src/AXP192.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ void AXP192::begin() {
delay(100);
// I2C_WriteByteDataAt(0X15,0XFE,0XFF);

SetPeripherialsPower(true);

// axp: check v-bus status
if (Read8bit(0x00) & 0x08) {
Write1Byte(0x30, Read8bit(0x30) | 0x80);
Expand Down

0 comments on commit 87845d5

Please sign in to comment.