|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
#include <PmicPowerBase.hpp>
Public Member Functions | |
| virtual bool | setMinimumSystemVoltage (uint32_t mv)=0 |
| Set the minimum system voltage. | |
| virtual uint32_t | getMinimumSystemVoltage () const =0 |
| Get the minimum system voltage. | |
| virtual bool | setInputVoltageLimit (uint32_t mv)=0 |
| Set the input voltage limit. | |
| virtual uint32_t | getInputVoltageLimit () const =0 |
| Get the input voltage limit. | |
| virtual bool | setInputCurrentLimit (uint32_t ma)=0 |
| Set the input current limit. | |
| virtual uint32_t | getInputCurrentLimit () const =0 |
| Get the input current limit. | |
| virtual bool | enableBoost (bool enable) |
| Enable boost functionality. | |
| virtual bool | isBoostEnabled () const |
| Check if boost functionality is enabled. | |
| virtual bool | setBoostVoltage (uint16_t mv) |
| Set the boost voltage. | |
| virtual uint16_t | getBoostVoltage () const |
| Get the boost voltage. | |
| virtual bool | enableShipMode (bool enable) |
| Enable ship mode (battery disconnect) | |
| virtual bool | isShipModeEnabled () const |
| Check if ship mode is enabled. | |
| virtual | ~PmicPowerBase ()=default |
| Virtual destructor. | |
Definition at line 42 of file PmicPowerBase.hpp.
|
virtualdefault |
Virtual destructor.
|
inlinevirtual |
Enable boost functionality.
| enable | True to enable, false to disable. |
Reimplemented in SY6970Power, BQ25896Power, and AXP517Power.
Definition at line 90 of file PmicPowerBase.hpp.
|
inlinevirtual |
Enable ship mode (battery disconnect)
When enabled, the BATFET is turned off to disconnect the battery from the system. This is used for shipping mode or to completely power off the device when no external power is available.
| enable | True to enter ship mode (battery disconnected), false to exit |
Reimplemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.
Definition at line 142 of file PmicPowerBase.hpp.
|
inlinevirtual |
Get the boost voltage.
Reimplemented in SY6970Power, BQ25896Power, and AXP517Power.
Definition at line 124 of file PmicPowerBase.hpp.
Referenced by loop().
|
pure virtual |
Get the input current limit.
Implemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.
Referenced by setup().
|
pure virtual |
Get the input voltage limit.
Implemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.
Referenced by setup().
|
pure virtual |
Get the minimum system voltage.
| Minimum | voltage in millivolts. |
Implemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.
Referenced by setup().
|
inlinevirtual |
Check if boost functionality is enabled.
Reimplemented in SY6970Power, BQ25896Power, and AXP517Power.
Definition at line 103 of file PmicPowerBase.hpp.
Referenced by loop().
|
inlinevirtual |
Check if ship mode is enabled.
Reimplemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.
Definition at line 152 of file PmicPowerBase.hpp.
|
inlinevirtual |
Set the boost voltage.
| mv | Boost voltage in millivolts. |
Reimplemented in SY6970Power, BQ25896Power, and AXP517Power.
Definition at line 114 of file PmicPowerBase.hpp.
|
pure virtual |
Set the input current limit.
*
| ma | Current limit in milliamperes. |
Implemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.
Referenced by setup().
|
pure virtual |
Set the input voltage limit.
| mv | Voltage limit in millivolts. |
Implemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.
Referenced by setup().
|
pure virtual |
Set the minimum system voltage.
| mv | Minimum voltage in millivolts. |
| True | if the operation was successful, false otherwise. |
Implemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.
Referenced by setup().