PebbleOS
Loading...
Searching...
No Matches
Functions
QEMU battery

Battery state set from the QEMU host. More...

Functions

void qemu_battery_msg_callback (const uint8_t *data, uint32_t len)
 Handle a QemuProtocol_Battery message from the host.
 
uint8_t qemu_battery_get_percent (void)
 Get the battery percentage last set by the host.
 

Detailed Description

Battery state set from the QEMU host.

Function Documentation

◆ qemu_battery_get_percent()

uint8_t qemu_battery_get_percent ( void  )

Get the battery percentage last set by the host.

Lets the battery service skip the lossy voltage curve round trip on QEMU.

Returns
Charge percentage, 0 to 100.

◆ qemu_battery_msg_callback()

void qemu_battery_msg_callback ( const uint8_t *  data,
uint32_t  len 
)

Handle a QemuProtocol_Battery message from the host.

Called by the QEMU host channel.

Parameters
dataMessage payload, a QemuProtocolBatteryHeader.
lenLength of data in bytes.