|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
#include <PmicSY6970.hpp>
Public Member Functions | |
| PmicSY6970 () | |
| Construct SY6970 PMIC interface. | |
| bool | begin (SensorCommCustom::CustomCallback callback, SensorCommCustomHal::CustomHalCallback hal_cb, uint8_t addr) |
| Initialize using custom I2C callback. | |
| void | end () |
| Deinitialize and release resources. | |
| PmicCapability::Capability | getCapabilities () const override |
| Get supported PMIC capabilities. | |
| SY6970Charger & | charger () |
| Get charger interface. | |
| PmicChargerBase * | getCharger () override |
| Get charger interface (base class pointer) | |
| PmicPowerBase & | getPower () override |
| Get power management interface. | |
| PmicAdcBase & | getAdc () override |
| Get ADC interface. | |
| PmicLedBase & | getLed () override |
| Get LED interface. | |
| SY6970Power & | power () |
| SY6970Led & | led () |
| SY6970Adc & | adc () |
| const PmicConfig & | getConfig () const override |
| Get device name. | |
| const char * | getChipName () const override |
| Get PMIC device name. | |
| SY6970Core & | core () |
| Get core interface (mutable) | |
| const SY6970Core & | core () const |
| Get core interface (const) | |
Public Member Functions inherited from PmicBase | |
| virtual | ~PmicBase ()=default |
| Virtual destructor. | |
| virtual PmicGpioBase * | getGpio () |
| Get GPIO interface. | |
| virtual PmicChannelBase * | getChannel () |
| Get power output channel interface. | |
| virtual PmicIrqBase * | getIrq () |
| Get interrupt interface. | |
Definition at line 62 of file PmicSY6970.hpp.
|
inline |
Construct SY6970 PMIC interface.
Initializes the internal core and sub-modules. Sub-modules (charger, power, adc) are constructed with reference to the shared core.
Definition at line 72 of file PmicSY6970.hpp.
|
inline |
Definition at line 247 of file PmicSY6970.hpp.
|
inlinevirtual |
Initialize using custom I2C callback.
For custom I2C implementations (bit-banging, SPI-I2C bridge, etc.)
| callback | Custom read/write callback function |
| hal_cb | No use this callback,can be nullptr |
| addr | I2C address (default: SY6970_SLAVE_ADDRESS) |
Implements PmicBase.
Definition at line 127 of file PmicSY6970.hpp.
References I2CDeviceWithHal::begin().
Referenced by setup().
|
inline |
Get charger interface.
Use for:
Definition at line 167 of file PmicSY6970.hpp.
|
inline |
Get core interface (mutable)
For direct register access and status reading.
Definition at line 287 of file PmicSY6970.hpp.
|
inline |
Get core interface (const)
Definition at line 296 of file PmicSY6970.hpp.
|
inlinevirtual |
Deinitialize and release resources.
Calls end() on the core to perform cleanup.
Implements PmicBase.
Definition at line 139 of file PmicSY6970.hpp.
References SY6970Core::end().
|
inlineoverridevirtual |
Get ADC interface.
Use for:
Implements PmicBase.
Definition at line 209 of file PmicSY6970.hpp.
|
inlineoverridevirtual |
Get supported PMIC capabilities.
Implements PmicBase.
Definition at line 150 of file PmicSY6970.hpp.
References PmicCapability::PmicSupportAdc, PmicCapability::PmicSupportCharger, and PmicCapability::PmicSupportPower.
|
inlineoverridevirtual |
Get charger interface (base class pointer)
Reimplemented from PmicBase.
Definition at line 176 of file PmicSY6970.hpp.
|
inlineoverridevirtual |
Get PMIC device name.
Implements PmicBase.
Definition at line 276 of file PmicSY6970.hpp.
|
inlineoverridevirtual |
Get device name.
Implements PmicBase.
Definition at line 256 of file PmicSY6970.hpp.
References PmicConfig::chipName, PmicCapability::PmicSupportAdc, PmicCapability::PmicSupportCharger, and PmicCapability::PmicSupportPower.
|
inlineoverridevirtual |
Get LED interface.
Controls the STAT pin for charging status indication.
Implements PmicBase.
Definition at line 230 of file PmicSY6970.hpp.
|
inlineoverridevirtual |
Get power management interface.
Use for:
Implements PmicBase.
Definition at line 192 of file PmicSY6970.hpp.
|
inline |
Definition at line 242 of file PmicSY6970.hpp.
Referenced by setup().
|
inline |
Definition at line 237 of file PmicSY6970.hpp.