Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
devboard_batt.c File Reference
Include dependency graph for devboard_batt.c:

Functions

uint16_t DVBD_BattGetVolts (void)
 read the battery voltage More...
 
uint8_t DVBD_BattGetPercent (uint16_t vBatt)
 get the battery percentage More...
 
uint8_t DVBD_BattGetChargeStat (void)
 get the battery charging status More...
 
uint8_t DVBD_BattGetUSBPresent (void)
 check if +5V (USB Vbus or external) is connected More...
 
ca_error DVBD_BattInitChargeStat (void)
 initialise CHARGE_STAT More...
 
ca_error DVBD_BattInitVolts (void)
 initialise VOLTS and VOLTS_TEST More...
 
ca_error DVBD_BattInitUSBPresent (void)
 initialise USB_PRESENT More...
 

Function Documentation

◆ 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()

ca_error DVBD_BattInitVolts ( void  )

initialise VOLTS and VOLTS_TEST

Returns
status