DMCP interface 03.15_021
Loading...
Searching...
No Matches
Power/voltage

Power and voltage. More...

Functions

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

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