Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
Battery Service (BAS) More...
Functions | |
uint8_t | bt_bas_get_battery_level (void) |
Read battery level value. | |
int | bt_bas_set_battery_level (uint8_t level) |
Update battery level value. | |
Battery Service (BAS)
[Experimental] Users should note that the APIs can change as a part of ongoing development.
uint8_t bt_bas_get_battery_level | ( | void | ) |
#include <include/zephyr/bluetooth/services/bas.h>
Read battery level value.
Read the characteristic value of the battery level
int bt_bas_set_battery_level | ( | uint8_t | level | ) |
#include <include/zephyr/bluetooth/services/bas.h>
Update battery level value.
Update the characteristic value of the battery level This will send a GATT notification to all current subscribers.
level | The battery level in percent. |