|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
PMIC power output channel base interface. More...
#include <PmicChannelBase.hpp>
Classes | |
| struct | Info |
| Static metadata for a single power output channel. More... | |
Public Types | |
| enum class | Type : uint8_t { DCDC = 0 , LDO = 1 } |
| Regulator type classification. More... | |
Public Member Functions | |
| virtual | ~PmicChannelBase ()=default |
| Virtual destructor. | |
| virtual bool | enable (uint8_t channel, bool enable)=0 |
| Enable or disable a power output channel. | |
| virtual bool | isEnabled (uint8_t channel)=0 |
| Check whether a power output channel is currently enabled. | |
| virtual bool | setVoltage (uint8_t channel, uint16_t mV)=0 |
| Set the output voltage of a channel. | |
| virtual uint16_t | getVoltage (uint8_t channel)=0 |
| Get the current output voltage of a channel. | |
| virtual uint8_t | count () const =0 |
| Get the number of power output channels available on this PMIC. | |
| virtual Info | getInfo (uint8_t channel) const =0 |
| Get static metadata for a specific channel. | |
PMIC power output channel base interface.
Provides unified access to DCDC buck converters and LDO regulators. Each channel is identified by a uint8_t index; the channel-to-rail mapping is chip-specific and documented in the implementation's getInfo() table.
Usage:
Definition at line 61 of file PmicChannelBase.hpp.
|
strong |
Regulator type classification.
| Enumerator | |
|---|---|
| DCDC | Switching buck/boost converter. |
| LDO | Linear low-dropout regulator. |
Definition at line 67 of file PmicChannelBase.hpp.
|
virtualdefault |
Virtual destructor.
|
pure virtual |
Get the number of power output channels available on this PMIC.
Implemented in AXP192Channel, AXP202Channel, and AXP2101Channel.
Referenced by setup().
|
pure virtual |
Enable or disable a power output channel.
| channel | Channel index (0-based, see implementation for mapping). |
| enable | true to turn on, false to turn off. |
Implemented in AXP192Channel, AXP202Channel, and AXP2101Channel.
Referenced by setup().
|
pure virtual |
Get static metadata for a specific channel.
| channel | Channel index. |
Implemented in AXP192Channel, AXP202Channel, and AXP2101Channel.
Referenced by setup().
|
pure virtual |
Get the current output voltage of a channel.
| channel | Channel index. |
Implemented in AXP192Channel, AXP202Channel, and AXP2101Channel.
Referenced by setup().
|
pure virtual |
Check whether a power output channel is currently enabled.
| channel | Channel index. |
Implemented in AXP192Channel, AXP202Channel, and AXP2101Channel.
|
pure virtual |
Set the output voltage of a channel.
| channel | Channel index. |
| mV | Desired voltage in millivolts. Value will be quantized to the nearest valid step within the channel's range. |
Implemented in AXP192Channel, AXP202Channel, and AXP2101Channel.
Referenced by setup().