Hi @felmue , thank you very much for your help. With that I was able to add some lines to the axp2101.h and axp2101.cpp of the Core2 library. I can now successfully check .isCharging() of the axp2101. I am will try to do the same thing for other functions..
Thanks again!
added to axp2101.h:
bool isCharging(void);
added to axp2101.cpp:
bool AXP2101::isCharging() {
uint8_t registerValue = readRegister8(_addr, 0x01, _speed);
return (registerValue & 0b01100000) == 0b00100000;
}
Changed in axp.cpp:
bool AXP::isCharging() {
if (_pmic == pmic_axp192) {
return axp192.isCharging();
}
if (_pmic == pmic_axp2101) {
return axp2101.isCharging();
}
return true;
}