29 #ifndef DEVBOARD_BATT_H
30 #define DEVBOARD_BATT_H
50 #define BATT_TYPE_RCR123A 1
51 #define BATT_TYPE_CR123A 0
54 #define BATT_USB_PRESENT_PIN 5
55 #define BATT_VOLTS_TEST_PIN 6
56 #define BATT_VOLTS_PIN 35
57 #define BATT_CHARGE_STAT_PIN 36
The main ca821x-api include file.
Global error declarations for use across the Cascoda SDK.
Type definitions used by Cascoda baremetal drivers.
dvbd_vbus_state
Definition: devboard_batt.h:44
@ CONNECTED
Definition: devboard_batt.h:46
@ NOT_CONNECTED
Definition: devboard_batt.h:45
ca_error DVBD_BattInitChargeStat(void)
initialise CHARGE_STAT
Definition: devboard_batt.c:138
uint16_t DVBD_BattGetVolts(void)
read the battery voltage
Definition: devboard_batt.c:38
ca_error DVBD_BattInitVolts(void)
initialise VOLTS and VOLTS_TEST
Definition: devboard_batt.c:152
dvbd_charging_state
Definition: devboard_batt.h:38
@ CHARGING
Definition: devboard_batt.h:40
@ NOT_CHARGING
Definition: devboard_batt.h:39
uint8_t DVBD_BattGetPercent(uint16_t vBatt)
get the battery percentage
Definition: devboard_batt.c:56
uint8_t DVBD_BattGetUSBPresent(void)
check if +5V (USB Vbus or external) is connected
Definition: devboard_batt.c:132
uint8_t DVBD_BattGetChargeStat(void)
get the battery charging status
Definition: devboard_batt.c:126
ca_error DVBD_BattInitUSBPresent(void)
initialise USB_PRESENT
Definition: devboard_batt.c:178
ca_error
Cascoda error type.
Definition: ca821x_error.h:51