Go to the source code of this file.
◆ BATT_CHARGE_STAT_PIN
#define BATT_CHARGE_STAT_PIN 36 |
◆ BATT_TYPE_CR123A
#define BATT_TYPE_CR123A 0 |
◆ BATT_TYPE_RCR123A
#define BATT_TYPE_RCR123A 1 |
◆ BATT_USB_PRESENT_PIN
#define BATT_USB_PRESENT_PIN 5 |
◆ BATT_VOLTS_PIN
#define BATT_VOLTS_PIN 35 |
◆ BATT_VOLTS_TEST_PIN
#define BATT_VOLTS_TEST_PIN 6 |
◆ dvbd_charging_state
Enumerator |
---|
NOT_CHARGING | |
CHARGING | |
◆ dvbd_vbus_state
Enumerator |
---|
NOT_CONNECTED | |
CONNECTED | |
◆ DVBD_BattGetChargeStat()
uint8_t DVBD_BattGetChargeStat |
( |
void |
| ) |
|
get the battery charging status
- Returns
- NOT_CHARGING (0) or CHARGING (1)
◆ DVBD_BattGetPercent()
uint8_t DVBD_BattGetPercent |
( |
uint16_t |
vBatt | ) |
|
get the battery percentage
- Returns
- battery percentage (%)
◆ DVBD_BattGetUSBPresent()
uint8_t DVBD_BattGetUSBPresent |
( |
void |
| ) |
|
check if +5V (USB Vbus or external) is connected
- Returns
- NOT_CONNECTED (0) or CONNECTED (1)
◆ DVBD_BattGetVolts()
uint16_t DVBD_BattGetVolts |
( |
void |
| ) |
|
read the battery voltage
- Returns
- vbatt * 100 (10mV resolution)
◆ DVBD_BattInitChargeStat()
ca_error DVBD_BattInitChargeStat |
( |
void |
| ) |
|
initialise CHARGE_STAT
- Returns
- status
◆ DVBD_BattInitUSBPresent()
ca_error DVBD_BattInitUSBPresent |
( |
void |
| ) |
|
initialise USB_PRESENT
- Returns
- status
◆ DVBD_BattInitVolts()
initialise VOLTS and VOLTS_TEST
- Returns
- status