Hardware witnesses regarding battery chargers.
More...
#include <BatteryMonitorHardware.hpp>
Hardware witnesses regarding battery chargers.
Definition at line 63 of file BatteryMonitorHardware.hpp.
◆ setChargingWitness()
| static void BatteryCharger::setChargingWitness |
( |
InputGPIO | sensePin, |
|
|
bool | negativeLogic, |
|
|
bool | enableInternalPullResistor ) |
|
static |
Set a GPIO pin to sense if the battery is being charged.
- Parameters
-
| sensePin | GPIO pin attached to the battery charger chip |
| negativeLogic | If true, LOW voltage means the battery is charging. If false, HIGH voltage means the battery is charging. |
| enableInternalPullResistor | If true, the corresponding internal pullup/pulldown resistor is enabled. Set to true if the witness signal works in open drain. |
◆ setExternalPowerWitness()
| static void BatteryCharger::setExternalPowerWitness |
( |
InputGPIO | sensePin, |
|
|
bool | negativeLogic, |
|
|
bool | enableInternalPullResistor ) |
|
static |
Set a GPIO pin to sense the power wire.
- Parameters
-
| sensePin | GPIO pin to sense the power wire |
| negativeLogic | If true, LOW voltage means there is external power If false, HIGH voltage means there is external power |
| enableInternalPullResistor | If true, the corresponding internal pullup/pulldown resistor is enabled. Set to true if the wire sensing signal works in open drain. |
◆ update()
Update the battery status according to the witnesses.
- Parameters
-
| [in,out] | status | Battery status |
The documentation for this class was generated from the following file: