|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
BQ25896 LED/STAT Pin Control. More...
#include <BQ25896Led.hpp>
Public Member Functions | |
| BQ25896Led (BQ25896Core &core) | |
| Construct LED interface. | |
| ~BQ25896Led ()=default | |
| bool | setOutputType (OutputType type) override |
| Set LED output type. | |
| bool | setMode (Mode mode) override |
| Set LED operating mode. | |
| Mode | getMode () override |
| Get LED operating mode. | |
| bool | setManualState (ManualState state) override |
| Set manual LED state. | |
| ManualState | getManualState () override |
| Get manual LED state. | |
Public Member Functions inherited from PmicLedBase | |
| virtual | ~PmicLedBase ()=default |
Additional Inherited Members | |
Public Types inherited from PmicLedBase | |
| enum class | OutputType : uint8_t { OpenDrain = 0 , PushPull = 1 } |
| enum class | Mode : uint8_t { AUTO = 0 , MANUAL = 1 , BREATH = 2 , DISABLE = 3 , VENDOR = 255 } |
| High-level LED operating mode (portable subset). More... | |
| enum class | ManualState : uint8_t { HiZ = 0 , LEVEL_LOW = 1 , LEVEL_HIGH = 2 , BLINK_1HZ = 3 , BLINK_4HZ = 4 , UNDEFINED = 255 } |
| Manual LED state (portable subset). More... | |
BQ25896 LED/STAT Pin Control.
Definition at line 55 of file BQ25896Led.hpp.
|
explicit |
Construct LED interface.
| core | Reference to BQ25896 core communication |
Definition at line 38 of file BQ25896Led.cpp.
|
default |
|
overridevirtual |
Get manual LED state.
Implements PmicLedBase.
Definition at line 69 of file BQ25896Led.cpp.
References PmicLedBase::UNDEFINED.
|
overridevirtual |
Get LED operating mode.
Implements PmicLedBase.
Definition at line 56 of file BQ25896Led.cpp.
References PmicLedBase::AUTO, PmicLedBase::DISABLE, SensorCommWrapper::readReg(), and PmicLedBase::VENDOR.
|
overridevirtual |
Set manual LED state.
Implements PmicLedBase.
Definition at line 63 of file BQ25896Led.cpp.
|
overridevirtual |
Set LED operating mode.
Controls the STAT pin behavior. BQ25896 supports:
| mode | Operating mode |
Implements PmicLedBase.
Definition at line 46 of file BQ25896Led.cpp.
References PmicLedBase::AUTO, PmicLedBase::DISABLE, and SensorCommWrapper::updateBits().
Referenced by setup().
|
overridevirtual |
Set LED output type.
Sets the STAT pin output configuration. BQ25896 only supports OpenDrain mode.
| type | Output type (OpenDrain or PushPull) |
Implements PmicLedBase.
Definition at line 40 of file BQ25896Led.cpp.