57 return (val < 0) ? 0 :
static_cast<uint8_t
>(val);
73 return (val < 0) ? 0 :
static_cast<uint8_t
>(val);
90 return (val < 0) ? 0 :
static_cast<uint8_t
>(val);
106 return (val < 0) ? 0 :
static_cast<uint8_t
>(val);
134 if (opt > 3)
return false;
141 return (val < 0) ? 0 :
static_cast<uint8_t
>((val >> 5) & 0x03);
151 if (opt > 3)
return false;
158 return (val < 0) ? 0 :
static_cast<uint8_t
>(val & 0x03);
170 if (opt > 3)
return false;
177 return (val < 0) ? 0 :
static_cast<uint8_t
>((val >> 6) & 0x03);
187 if (opt > 3)
return false;
194 return (val < 0) ? 0 :
static_cast<uint8_t
>(val & 0x03);
bool enableBackupCharger(bool enable)
Enable backup battery charger (REG 35H bit 7)
AXP202ChargerEx(AXP202Core &core)
bool setChargeHighTempThreshold(uint8_t val)
Set charge high-temperature fault threshold (REG 39H)
bool setChargeLowTempThreshold(uint8_t val)
Set charge low-temperature fault threshold (REG 38H)
bool setDischargeLowTempThreshold(uint8_t val)
Set discharge low-temperature fault threshold (REG 3CH)
bool setBackupChargerVoltage(uint8_t opt)
Set backup battery charge voltage (REG 35H bits 6:5)
uint8_t getChargeHighTempThreshold()
bool setConstantCurrentTimeout(uint8_t opt)
Set constant-current charge timeout (REG 34H bits 1:0)
uint8_t getPrechargeTimeout()
uint8_t getConstantCurrentTimeout()
uint8_t getDischargeLowTempThreshold()
bool setBackupChargerCurrent(uint8_t opt)
Set backup battery charge current (REG 35H bits 1:0)
uint8_t getBackupChargerCurrent()
uint8_t getDischargeHighTempThreshold()
uint8_t getChargeLowTempThreshold()
bool isBackupChargerEnabled()
bool setPrechargeTimeout(uint8_t opt)
Set precharge timeout (REG 34H bits 7:6)
uint8_t getBackupChargerVoltage()
bool setDischargeHighTempThreshold(uint8_t val)
Set discharge high-temperature fault threshold (REG 3DH)
bool clrRegBit(uint8_t reg, uint8_t bit)
bool getRegBit(uint8_t reg, uint8_t bit)
int readReg(uint8_t reg) const
int writeReg(uint8_t reg, uint8_t val)
int updateBits(uint8_t reg, uint8_t mask, uint8_t value_shifted)
bool setRegBit(uint8_t reg, uint8_t bit)
static constexpr uint8_t BACKUP_CHG
static constexpr uint8_t VLTF_CHGSET
static constexpr uint8_t TLTF_DISCHGSET
static constexpr uint8_t VHTF_CHGSET
static constexpr uint8_t THTF_DISCHGSET
static constexpr uint8_t CHARGE2