DMCP interface  03.15_020
Power/voltage

Power and voltage. More...

Functions

uint32_t read_power_voltage ()
 Reads power voltage. More...
 
int get_lowbat_state ()
 Returns low-battery flag. More...
 
int get_vbat ()
 Returns battery voltage. More...
 
int usb_powered ()
 Returns USB powered status. More...
 

Detailed Description

Power and voltage.

Function Documentation

◆ get_lowbat_state()

int get_lowbat_state ( )

Returns low-battery flag.

Returns
1 = battery low, 0 - battery OK

◆ get_vbat()

int get_vbat ( )

Returns battery voltage.

Returns
[mV] Battery voltage (last previously read value if powered from USB)

◆ read_power_voltage()

uint32_t read_power_voltage ( )

Reads power voltage.

Returns
[mV] Power voltage

◆ usb_powered()

int usb_powered ( )

Returns USB powered status.

Returns
1 = powered from USB, 0 = battery powered