|
Lamp-Da 0.1
A compact lantern project
|
Store the charger characteristics. More...
#include <charger.h>
Public Types | |
| enum class | ChargerStatus_t { UNINITIALIZED , INACTIVE , POWER_DETECTED , SLOW_CHARGING , CHARGING , CHARGE_FINISHED , ERROR_BATTERY_MISSING , ERROR_SOFTWARE , ERROR_HARDWARE } |
| Indicates a charger status soecific states. More... | |
Public Attributes | |
| bool | areMeasuresOk = false |
| everything below makes no sense if this is false | |
| bool | isChargeOkSignalHigh |
| True if we have a valid chargeOk signal from the component. | |
| bool | isInOtg |
| True if OTG is activated. | |
| uint32_t | lastUpdateTime_ms = 0 |
| time of the last update of this struct. | |
| uint16_t | inputCurrent_mA = 0 |
| input current in VBUS side, in milliamps. | |
| uint16_t | chargeCurrent_mA = 0 |
| charge current of the battery, in milliamps. | |
| uint16_t | powerRail_mV = 0 |
| powerRail voltage (can be the same as VBUS in charge & OTG mode). Min value at 3200mV | |
| uint16_t | batteryVoltage_mV = 0 |
| battery voltage | |
| int16_t | batteryCurrent_mA = 0 |
| battery current (> 0 charging, < 0 discharging) | |
| ChargerStatus_t | status = ChargerStatus_t::UNINITIALIZED |
| global high level charger status | |
| std::string | hardwareErrorMessage = "" |
| Contain a more detailed error of an hardware error. | |
| std::string | softwareErrorMessage = "" |
| Contain a more detailed error of a software error. | |
Store the charger characteristics.
|
strong |
Indicates a charger status soecific states.