|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
AXP517 power-path driver. More...
#include <AXP517Power.hpp>
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. | |
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.
| AXP517Power::AXP517Power | ( | AXP517Core & | core | ) |
Construct an AXP517 power-path driver.
| core | Shared AXP517 register transport. |
Definition at line 37 of file AXP517Power.cpp.
|
default |
|
overridevirtual |
Enable boost functionality.
| enable | true to enable, false to disable. |
| true | on 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().
| bool AXP517Power::enableRBFET | ( | bool | enable | ) | const |
Enable or disable the RBFET.
| enable | true to enable, false to disable. |
| true | on 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().
|
overridevirtual |
Enter ship mode.
| enable | true to enter ship mode, false to exit. |
| true | on 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().
|
overridevirtual |
Get the boost voltage.
Reimplemented from PmicPowerBase.
Definition at line 111 of file AXP517Power.cpp.
References axp517_regs::ctrl::BOOST_CFG, and SensorCommWrapper::readReg().
|
overridevirtual |
Get the input current limit.
Implements PmicPowerBase.
Definition at line 82 of file AXP517Power.cpp.
References axp517_regs::ctrl::INPUT_CURR_LIMIT, and SensorCommWrapper::readReg().
|
overridevirtual |
Get the input voltage limit.
Implements PmicPowerBase.
Definition at line 65 of file AXP517Power.cpp.
References axp517_regs::ctrl::INPUT_VOLT_LIMIT, and SensorCommWrapper::readReg().
|
overridevirtual |
Get the minimum system voltage.
Implements PmicPowerBase.
Definition at line 49 of file AXP517Power.cpp.
References axp517_regs::ctrl::MIN_SYS_VOLTAGE, and SensorCommWrapper::readReg().
|
overridevirtual |
Check if boost functionality is enabled.
| true | if 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.
| bool AXP517Power::isRBFETEnabled | ( | ) | const |
Check if RBFET is enabled.
| true | if RBFET is enabled, false otherwise. |
Definition at line 138 of file AXP517Power.cpp.
References SensorCommWrapper::getRegBit(), and axp517_regs::ctrl::RBFET_CTRL.
|
overridevirtual |
Check if ship mode is enabled.
| true | if 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.
|
overridevirtual |
Set the boost voltage.
| mv | Boost voltage in millivolts. |
| true | on 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().
|
overridevirtual |
Set the input current limit.
| mA | Current limit in milliamps, range 100-3250mA, steps 50mA. |
| true | on 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().
|
overridevirtual |
Set the input voltage limit.
| mv | Voltage limit in millivolts, range 3600-16200mV, steps 100mV. |
| true | on 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().
|
overridevirtual |
Set the minimum system voltage.
| mv | Minimum voltage in millivolts, range 1000-3800mV, steps 100mV. |
| true | on 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().