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

#include <PmicPowerBase.hpp>

Inheritance diagram for PmicPowerBase:
[legend]

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.
 

Detailed Description

Definition at line 42 of file PmicPowerBase.hpp.

Constructor & Destructor Documentation

◆ ~PmicPowerBase()

virtual PmicPowerBase::~PmicPowerBase ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ enableBoost()

virtual bool PmicPowerBase::enableBoost ( bool  enable)
inlinevirtual

Enable boost functionality.

Parameters
enableTrue to enable, false to disable.
Note
Not all PMICs support boost output (OTG/BOOST). For unsupported PMICs, this method returns false.

Reimplemented in SY6970Power, BQ25896Power, and AXP517Power.

Definition at line 90 of file PmicPowerBase.hpp.

◆ enableShipMode()

virtual bool PmicPowerBase::enableShipMode ( bool  enable)
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.

Parameters
enableTrue to enter ship mode (battery disconnected), false to exit
Returns
true on success, false if not supported or I2C error
Note
When ship mode is enabled, the device cannot be powered from battery. To exit ship mode, VBUS must be connected to power the system.

Reimplemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.

Definition at line 142 of file PmicPowerBase.hpp.

◆ getBoostVoltage()

virtual uint16_t PmicPowerBase::getBoostVoltage ( ) const
inlinevirtual

Get the boost voltage.

Returns
Boost voltage in millivolts.

Reimplemented in SY6970Power, BQ25896Power, and AXP517Power.

Definition at line 124 of file PmicPowerBase.hpp.

Referenced by loop().

◆ getInputCurrentLimit()

virtual uint32_t PmicPowerBase::getInputCurrentLimit ( ) const
pure virtual

Get the input current limit.

Returns
Input current limit in milliamperes.

Implemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.

Referenced by setup().

◆ getInputVoltageLimit()

virtual uint32_t PmicPowerBase::getInputVoltageLimit ( ) const
pure virtual

Get the input voltage limit.

Returns
Input voltage limit in millivolts.

Implemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.

Referenced by setup().

◆ getMinimumSystemVoltage()

virtual uint32_t PmicPowerBase::getMinimumSystemVoltage ( ) const
pure virtual

Get the minimum system voltage.

Note
This function retrieves the minimum voltage required for the system to operate.
Return values
Minimumvoltage in millivolts.

Implemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.

Referenced by setup().

◆ isBoostEnabled()

virtual bool PmicPowerBase::isBoostEnabled ( ) const
inlinevirtual

Check if boost functionality is enabled.

Returns
True if boost is enabled, false otherwise.
Note
Not all PMICs support boost output (OTG/BOOST). For unsupported PMICs, this method returns false.

Reimplemented in SY6970Power, BQ25896Power, and AXP517Power.

Definition at line 103 of file PmicPowerBase.hpp.

Referenced by loop().

◆ isShipModeEnabled()

virtual bool PmicPowerBase::isShipModeEnabled ( ) const
inlinevirtual

Check if ship mode is enabled.

Returns
true if ship mode is active (battery disconnected)

Reimplemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.

Definition at line 152 of file PmicPowerBase.hpp.

◆ setBoostVoltage()

virtual bool PmicPowerBase::setBoostVoltage ( uint16_t  mv)
inlinevirtual

Set the boost voltage.

Parameters
mvBoost voltage in millivolts.
Note
Not all PMICs support boost output. Returns false for unsupported PMICs.

Reimplemented in SY6970Power, BQ25896Power, and AXP517Power.

Definition at line 114 of file PmicPowerBase.hpp.

◆ setInputCurrentLimit()

virtual bool PmicPowerBase::setInputCurrentLimit ( uint32_t  ma)
pure virtual

Set the input current limit.

*

Parameters
maCurrent limit in milliamperes.

Implemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.

Referenced by setup().

◆ setInputVoltageLimit()

virtual bool PmicPowerBase::setInputVoltageLimit ( uint32_t  mv)
pure virtual

Set the input voltage limit.

Parameters
mvVoltage limit in millivolts.

Implemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.

Referenced by setup().

◆ setMinimumSystemVoltage()

virtual bool PmicPowerBase::setMinimumSystemVoltage ( uint32_t  mv)
pure virtual

Set the minimum system voltage.

Note
This function sets the minimum voltage required for the system to operate.
Parameters
mvMinimum voltage in millivolts.
Return values
Trueif the operation was successful, false otherwise.

Implemented in SY6970Power, BQ25896Power, AXP1xxPower< Regs >, AXP1xxPower< axp192_regs >, AXP1xxPower< axp202_regs >, AXP2101Power, and AXP517Power.

Referenced by setup().


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