调试PMIC
This commit is contained in:
parent
10c3520006
commit
504aeaae01
@ -401,7 +401,7 @@ uint32_t AXP20X_Class::getBattDischargeCoulomb(void)
|
||||
return (buffer[0] << 24) + (buffer[1] << 16) + (buffer[2] << 8) + buffer[3];
|
||||
}
|
||||
|
||||
float AXP20X_Class::getCoulombData(void)
|
||||
float AXP20X_Class::getCoulombData(void)//返回充放了多少mah
|
||||
{
|
||||
if (!_init)
|
||||
return AXP_NOT_INIT;
|
||||
|
||||
@ -248,6 +248,10 @@ extern "C" void Axp202_task(void *pvParameter)
|
||||
|
||||
axp_config();
|
||||
|
||||
axp.ClearCoulombcounter();
|
||||
axp.EnableCoulombcounter();
|
||||
|
||||
|
||||
axp.enableIRQ(AXP202_ALL_IRQ, true);
|
||||
|
||||
axp.clearIRQ();
|
||||
@ -258,7 +262,8 @@ extern "C" void Axp202_task(void *pvParameter)
|
||||
if (io_num == AXP_ISR_GPIO) {
|
||||
axp.readIRQ();
|
||||
if (axp.isPEKLongtPressIRQ()) {
|
||||
ESP_LOGI(TAG, "AXP202 PEK key Click");
|
||||
ESP_LOGI(TAG, "AXP202 PEK key Click:%.2f,%.2f,%.2f,%d",axp.getBattVoltage(),axp.getCoulombData(),axp.getBattDischargeCurrent(),axp.getBattPercentage());
|
||||
// axp.shutdown();
|
||||
}
|
||||
axp.clearIRQ();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user