|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
#include <PmicBQ25896.hpp>
Public Member Functions | |
| PmicBQ25896 () | |
| Construct BQ25896 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. | |
| BQ25896Charger & | 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. | |
| BQ25896Power & | power () |
| BQ25896Led & | led () |
| BQ25896Adc & | adc () |
| const PmicConfig & | getConfig () const override |
| Get device name. | |
| const char * | getChipName () const override |
| Get PMIC device name. | |
| BQ25896Core & | core () |
| Get core interface (mutable) | |
| const BQ25896Core & | 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 84 of file PmicBQ25896.hpp.
|
inline |
Construct BQ25896 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 94 of file PmicBQ25896.hpp.
|
inline |
Definition at line 277 of file PmicBQ25896.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: BQ25896_SLAVE_ADDRESS = 0x6B) |
Implements PmicBase.
Definition at line 153 of file PmicBQ25896.hpp.
References I2CDeviceWithHal::begin().
Referenced by setup().
|
inline |
Get charger interface.
Use for:
Definition at line 193 of file PmicBQ25896.hpp.
|
inline |
Get core interface (mutable)
For direct register access, status reading, and advanced control. Use this for:
Definition at line 323 of file PmicBQ25896.hpp.
Referenced by loop().
|
inline |
Get core interface (const)
Definition at line 332 of file PmicBQ25896.hpp.
|
inlinevirtual |
Deinitialize and release resources.
Calls end() on the core to perform cleanup.
Implements PmicBase.
Definition at line 165 of file PmicBQ25896.hpp.
References BQ25896Core::end().
|
inlineoverridevirtual |
Get ADC interface.
Use for:
Implements PmicBase.
Definition at line 239 of file PmicBQ25896.hpp.
|
inlineoverridevirtual |
Get supported PMIC capabilities.
Implements PmicBase.
Definition at line 176 of file PmicBQ25896.hpp.
References PmicCapability::PmicSupportAdc, PmicCapability::PmicSupportCharger, and PmicCapability::PmicSupportPower.
|
inlineoverridevirtual |
Get charger interface (base class pointer)
Reimplemented from PmicBase.
Definition at line 202 of file PmicBQ25896.hpp.
|
inlineoverridevirtual |
Get PMIC device name.
Implements PmicBase.
Definition at line 306 of file PmicBQ25896.hpp.
|
inlineoverridevirtual |
Get device name.
Implements PmicBase.
Definition at line 286 of file PmicBQ25896.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 260 of file PmicBQ25896.hpp.
|
inlineoverridevirtual |
Get power management interface.
Use for:
Implements PmicBase.
Definition at line 218 of file PmicBQ25896.hpp.
|
inline |
Definition at line 272 of file PmicBQ25896.hpp.
Referenced by setup().
|
inline |
Definition at line 267 of file PmicBQ25896.hpp.