112 return (val < 0) ? 0 :
static_cast<uint8_t
>(val & 0xFF);
128 return (val < 0) ? 0 :
static_cast<uint8_t
>(val & 0xFF);
163 return (val < 0) ? 0 :
static_cast<uint8_t
>(val);
bool isOverTemperatureShutdownEnabled()
bool setDCDC3PWMMode(bool pwm)
Force DCDC3 to PWM mode (REG 80H bit 1)
bool setDCDCFrequency(uint8_t freq)
Set DCDC switching frequency (REG 37H)
bool enableOverTemperatureShutdown(bool enable)
Enable over-temperature shutdown (REG 8FH bit 2)
void disableLongPressShutdown()
Disable automatic power-off when the power key is held.
bool setDCDC2PWMMode(bool pwm)
Force DCDC2 to PWM mode (REG 80H bit 2)
bool setAPSWarningLevel2(uint8_t opt)
Set APS warning level 2 voltage (REG 3BH)
bool isVBUSDetectionEnabled()
AXP202PowerEx(AXP202Core &core)
uint8_t getDCDCFrequency()
bool setAPSWarningLevel1(uint8_t opt)
Set APS warning level 1 voltage (REG 3AH)
uint8_t getAPSWarningLevel2()
uint8_t getAPSWarningLevel1()
bool setLDO3Mode(LDO3Mode mode)
Select the LDO3 regulated output or DCIN pass-through path.
bool enableVBUSDetection(bool enable)
Enable VBUS Valid detection (REG 8BH bit 3)
void enableLongPressShutdown()
Enable automatic power-off when the power key is held.
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 VBUS_DET_SRP
static constexpr uint8_t APS_WARNING2
static constexpr uint8_t HOTOVER_CTL
static constexpr uint8_t POK_SET
static constexpr uint8_t DCDC_FREQSET
static constexpr uint8_t APS_WARNING1
static constexpr uint8_t LDO3OUT_VOL
static constexpr uint8_t DCDC_MODESET