SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
AXP517Power Class Reference

AXP517 power-path driver. More...

#include <AXP517Power.hpp>

Inheritance diagram for AXP517Power:
[legend]

Public Member Functions

 AXP517Power (AXP517Core &core)
 Construct an AXP517 power-path driver.
 
 ~AXP517Power ()=default
 
bool setMinimumSystemVoltage (uint32_t mv) override
 Set the minimum system voltage.
 
uint32_t getMinimumSystemVoltage () const override
 Get the minimum system voltage.
 
bool setInputVoltageLimit (uint32_t mv) override
 Set the input voltage limit.
 
uint32_t getInputVoltageLimit () const override
 Get the input voltage limit.
 
bool setInputCurrentLimit (uint32_t mA) override
 Set the input current limit.
 
uint32_t getInputCurrentLimit () const override
 Get the input current limit.
 
bool enableBoost (bool enable) override
 Enable boost functionality.
 
bool isBoostEnabled () const override
 Check if boost functionality is enabled.
 
bool setBoostVoltage (uint16_t mv) override
 Set the boost voltage.
 
uint16_t getBoostVoltage () const override
 Get the boost voltage.
 
bool enableShipMode (bool enable) override
 Enter ship mode.
 
bool isShipModeEnabled () const override
 Check if ship mode is enabled.
 
bool enableRBFET (bool enable) const
 Enable or disable the RBFET.
 
bool isRBFETEnabled () const
 Check if RBFET is enabled.
 
- Public Member Functions inherited from PmicPowerBase
virtual ~PmicPowerBase ()=default
 Virtual destructor.
 

Detailed Description

AXP517 power-path driver.

Provides input current/voltage limits, minimum system voltage, boost output, ship mode, and reverse-blocking FET controls.

Definition at line 42 of file AXP517Power.hpp.

Constructor & Destructor Documentation

◆ AXP517Power()

AXP517Power::AXP517Power ( AXP517Core core)

Construct an AXP517 power-path driver.

Parameters
coreShared AXP517 register transport.

Definition at line 37 of file AXP517Power.cpp.

◆ ~AXP517Power()

AXP517Power::~AXP517Power ( )
default

Member Function Documentation

◆ enableBoost()

bool AXP517Power::enableBoost ( bool  enable)
overridevirtual

Enable boost functionality.

Parameters
enabletrue to enable, false to disable.
Return values
trueon success, false on register access failure.

Reimplemented from PmicPowerBase.

Definition at line 90 of file AXP517Power.cpp.

References axp517_regs::ctrl::MODULE_EN1, and SensorCommWrapper::updateBits().

Referenced by loop().

◆ enableRBFET()

bool AXP517Power::enableRBFET ( bool  enable) const

Enable or disable the RBFET.

Parameters
enabletrue to enable, false to disable.
Return values
trueon success, false on register access failure.

Definition at line 129 of file AXP517Power.cpp.

References SensorCommWrapper::getRegBit(), axp517_regs::ctrl::RBFET_CTRL, axp517_regs::bmu::STATUS0, and SensorCommWrapper::updateBits().

◆ enableShipMode()

bool AXP517Power::enableShipMode ( bool  enable)
overridevirtual

Enter ship mode.

Parameters
enabletrue to enter ship mode, false to exit.
Return values
trueon success, false on register access failure.

Reimplemented from PmicPowerBase.

Definition at line 119 of file AXP517Power.cpp.

References axp517_regs::ctrl::BATFET_CTRL, and SensorCommWrapper::setRegBit().

◆ getBoostVoltage()

uint16_t AXP517Power::getBoostVoltage ( ) const
overridevirtual

Get the boost voltage.

Returns
Boost voltage in millivolts.

Reimplemented from PmicPowerBase.

Definition at line 111 of file AXP517Power.cpp.

References axp517_regs::ctrl::BOOST_CFG, and SensorCommWrapper::readReg().

◆ getInputCurrentLimit()

uint32_t AXP517Power::getInputCurrentLimit ( ) const
overridevirtual

Get the input current limit.

Returns
Input current limit in milliamps.

Implements PmicPowerBase.

Definition at line 82 of file AXP517Power.cpp.

References axp517_regs::ctrl::INPUT_CURR_LIMIT, and SensorCommWrapper::readReg().

◆ getInputVoltageLimit()

uint32_t AXP517Power::getInputVoltageLimit ( ) const
overridevirtual

Get the input voltage limit.

Returns
Input voltage limit in millivolts.

Implements PmicPowerBase.

Definition at line 65 of file AXP517Power.cpp.

References axp517_regs::ctrl::INPUT_VOLT_LIMIT, and SensorCommWrapper::readReg().

◆ getMinimumSystemVoltage()

uint32_t AXP517Power::getMinimumSystemVoltage ( ) const
overridevirtual

Get the minimum system voltage.

Note
This function retrieves the minimum voltage required for the system to operate.
Returns
Minimum system voltage in millivolts.

Implements PmicPowerBase.

Definition at line 49 of file AXP517Power.cpp.

References axp517_regs::ctrl::MIN_SYS_VOLTAGE, and SensorCommWrapper::readReg().

◆ isBoostEnabled()

bool AXP517Power::isBoostEnabled ( ) const
overridevirtual

Check if boost functionality is enabled.

Return values
trueif boost is enabled, false otherwise.

Reimplemented from PmicPowerBase.

Definition at line 95 of file AXP517Power.cpp.

References SensorCommWrapper::getRegBit(), and axp517_regs::ctrl::MODULE_EN1.

◆ isRBFETEnabled()

bool AXP517Power::isRBFETEnabled ( ) const

Check if RBFET is enabled.

Return values
trueif RBFET is enabled, false otherwise.

Definition at line 138 of file AXP517Power.cpp.

References SensorCommWrapper::getRegBit(), and axp517_regs::ctrl::RBFET_CTRL.

◆ isShipModeEnabled()

bool AXP517Power::isShipModeEnabled ( ) const
overridevirtual

Check if ship mode is enabled.

Return values
trueif ship mode is enabled, false otherwise.

Reimplemented from PmicPowerBase.

Definition at line 124 of file AXP517Power.cpp.

References SensorCommWrapper::getRegBit(), and axp517_regs::bmu::STATUS0.

◆ setBoostVoltage()

bool AXP517Power::setBoostVoltage ( uint16_t  mv)
overridevirtual

Set the boost voltage.

Parameters
mvBoost voltage in millivolts.
Return values
trueon success, false on register access failure.

Reimplemented from PmicPowerBase.

Definition at line 100 of file AXP517Power.cpp.

References axp517_regs::ctrl::BOOST_CFG, SensorCommWrapper::readReg(), and SensorCommWrapper::updateBits().

◆ setInputCurrentLimit()

bool AXP517Power::setInputCurrentLimit ( uint32_t  mA)
overridevirtual

Set the input current limit.

Parameters
mACurrent limit in milliamps, range 100-3250mA, steps 50mA.
Return values
trueon success, false on register access failure.

Implements PmicPowerBase.

Definition at line 74 of file AXP517Power.cpp.

References axp517_regs::ctrl::INPUT_CURR_LIMIT, and SensorCommWrapper::updateBits().

◆ setInputVoltageLimit()

bool AXP517Power::setInputVoltageLimit ( uint32_t  mv)
overridevirtual

Set the input voltage limit.

Parameters
mvVoltage limit in millivolts, range 3600-16200mV, steps 100mV.
Return values
trueon success, false on register access failure.

Implements PmicPowerBase.

Definition at line 57 of file AXP517Power.cpp.

References axp517_regs::ctrl::INPUT_VOLT_LIMIT, and SensorCommWrapper::updateBits().

◆ setMinimumSystemVoltage()

bool AXP517Power::setMinimumSystemVoltage ( uint32_t  mv)
overridevirtual

Set the minimum system voltage.

Note
This function sets the minimum voltage required for the system to operate.
Parameters
mvMinimum voltage in millivolts, range 1000-3800mV, steps 100mV.
Return values
trueon success, false on register access failure.

Implements PmicPowerBase.

Definition at line 41 of file AXP517Power.cpp.

References axp517_regs::ctrl::MIN_SYS_VOLTAGE, and SensorCommWrapper::updateBits().

Referenced by setup().


The documentation for this class was generated from the following files: