* Add ability to fetch and report peripheral battery levels on split centrals. * Add additional support for adding a new Battery Level service to split centrals that exposes fetched peripheral battery levels to connected hosts. Co-authored-by: Peter Johanson <peter@peterjohanson.com>
25 lines
No EOL
501 B
C
25 lines
No EOL
501 B
C
/*
|
|
* Copyright (c) 2020 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <zephyr/kernel.h>
|
|
#include <zmk/event_manager.h>
|
|
|
|
struct zmk_battery_state_changed {
|
|
// TODO: Other battery channels
|
|
uint8_t state_of_charge;
|
|
};
|
|
|
|
ZMK_EVENT_DECLARE(zmk_battery_state_changed);
|
|
|
|
struct zmk_peripheral_battery_state_changed {
|
|
uint8_t source;
|
|
// TODO: Other battery channels
|
|
uint8_t state_of_charge;
|
|
};
|
|
|
|
ZMK_EVENT_DECLARE(zmk_peripheral_battery_state_changed); |