|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
#include <AXP202ChargerEx.hpp>
Public Member Functions | |
| AXP202ChargerEx (AXP202Core &core) | |
| bool | setChargeLowTempThreshold (uint8_t val) |
| Set charge low-temperature fault threshold (REG 38H) | |
| uint8_t | getChargeLowTempThreshold () |
| bool | setChargeHighTempThreshold (uint8_t val) |
| Set charge high-temperature fault threshold (REG 39H) | |
| uint8_t | getChargeHighTempThreshold () |
| bool | setDischargeLowTempThreshold (uint8_t val) |
| Set discharge low-temperature fault threshold (REG 3CH) | |
| uint8_t | getDischargeLowTempThreshold () |
| bool | setDischargeHighTempThreshold (uint8_t val) |
| Set discharge high-temperature fault threshold (REG 3DH) | |
| uint8_t | getDischargeHighTempThreshold () |
| bool | enableBackupCharger (bool enable) |
| Enable backup battery charger (REG 35H bit 7) | |
| bool | isBackupChargerEnabled () |
| bool | setBackupChargerVoltage (uint8_t opt) |
| Set backup battery charge voltage (REG 35H bits 6:5) | |
| uint8_t | getBackupChargerVoltage () |
| bool | setBackupChargerCurrent (uint8_t opt) |
| Set backup battery charge current (REG 35H bits 1:0) | |
| uint8_t | getBackupChargerCurrent () |
| bool | setPrechargeTimeout (uint8_t opt) |
| Set precharge timeout (REG 34H bits 7:6) | |
| uint8_t | getPrechargeTimeout () |
| bool | setConstantCurrentTimeout (uint8_t opt) |
| Set constant-current charge timeout (REG 34H bits 1:0) | |
| uint8_t | getConstantCurrentTimeout () |
Definition at line 38 of file AXP202ChargerEx.hpp.
|
inlineexplicit |
Definition at line 41 of file AXP202ChargerEx.hpp.
|
inline |
Enable backup battery charger (REG 35H bit 7)
| enable | true to enable |
Definition at line 116 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::BACKUP_CHG, SensorCommWrapper::clrRegBit(), and SensorCommWrapper::setRegBit().
|
inline |
Definition at line 155 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::BACKUP_CHG, and SensorCommWrapper::readReg().
|
inline |
Definition at line 138 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::BACKUP_CHG, and SensorCommWrapper::readReg().
|
inline |
Definition at line 70 of file AXP202ChargerEx.hpp.
References SensorCommWrapper::readReg(), and axp202_regs::chg::VHTF_CHGSET.
|
inline |
Definition at line 54 of file AXP202ChargerEx.hpp.
References SensorCommWrapper::readReg(), and axp202_regs::chg::VLTF_CHGSET.
|
inline |
Definition at line 191 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::CHARGE2, and SensorCommWrapper::readReg().
|
inline |
Definition at line 103 of file AXP202ChargerEx.hpp.
References SensorCommWrapper::readReg(), and axp202_regs::chg::THTF_DISCHGSET.
|
inline |
Definition at line 87 of file AXP202ChargerEx.hpp.
References SensorCommWrapper::readReg(), and axp202_regs::chg::TLTF_DISCHGSET.
|
inline |
Definition at line 174 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::CHARGE2, and SensorCommWrapper::readReg().
|
inline |
Definition at line 122 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::BACKUP_CHG, and SensorCommWrapper::getRegBit().
|
inline |
Set backup battery charge current (REG 35H bits 1:0)
| opt | 0=50uA, 1=100uA, 2=200uA, 3=400uA |
Definition at line 149 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::BACKUP_CHG, and SensorCommWrapper::updateBits().
|
inline |
Set backup battery charge voltage (REG 35H bits 6:5)
| opt | 0=3.1V, 1=3.0V, 2=3.6V, 3=2.5V |
Definition at line 132 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::BACKUP_CHG, and SensorCommWrapper::updateBits().
|
inline |
Set charge high-temperature fault threshold (REG 39H)
| val | Raw 8-bit value. VHTF = val * 12.8mV |
Definition at line 65 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::VHTF_CHGSET, and SensorCommWrapper::writeReg().
|
inline |
Set charge low-temperature fault threshold (REG 38H)
| val | Raw 8-bit value. VLTF = val * 12.8mV |
Definition at line 49 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::VLTF_CHGSET, and SensorCommWrapper::writeReg().
|
inline |
Set constant-current charge timeout (REG 34H bits 1:0)
| opt | 0=6h, 1=8h, 2=10h, 3=12h |
Definition at line 185 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::CHARGE2, and SensorCommWrapper::updateBits().
|
inline |
Set discharge high-temperature fault threshold (REG 3DH)
| val | Raw 8-bit value |
Definition at line 98 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::THTF_DISCHGSET, and SensorCommWrapper::writeReg().
|
inline |
Set discharge low-temperature fault threshold (REG 3CH)
| val | Raw 8-bit value |
Definition at line 82 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::TLTF_DISCHGSET, and SensorCommWrapper::writeReg().
|
inline |
Set precharge timeout (REG 34H bits 7:6)
| opt | 0=40min, 1=50min, 2=60min, 3=70min |
Definition at line 168 of file AXP202ChargerEx.hpp.
References axp202_regs::chg::CHARGE2, and SensorCommWrapper::updateBits().