battery: Add zmk_battery_state_of_peripheral_charge()
As a counterpart to zmk_battery_state_of_charge()
This commit is contained in:
parent
f3a9efa8df
commit
b77f92a221
2 changed files with 5 additions and 0 deletions
|
@ -7,3 +7,6 @@
|
|||
#pragma once
|
||||
|
||||
uint8_t zmk_battery_state_of_charge();
|
||||
#if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||
uint8_t zmk_battery_state_of_peripheral_charge();
|
||||
#endif
|
||||
|
|
|
@ -72,6 +72,8 @@ ZMK_SUBSCRIPTION(peripheral_batt_lvl_listener, zmk_peripheral_battery_state_chan
|
|||
|
||||
uint8_t zmk_battery_state_of_charge() { return last_state_of_charge; }
|
||||
|
||||
uint8_t zmk_battery_state_of_peripheral_charge() { return last_state_of_peripheral_charge; }
|
||||
|
||||
static int zmk_battery_update(const struct device *battery) {
|
||||
struct sensor_value state_of_charge;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue