Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Battery Service (BAS) More...
Functions | |
uint8_t | bt_bas_get_battery_level (void) |
Read battery level value. More... | |
int | bt_bas_set_battery_level (uint8_t level) |
Update battery level value. More... | |
Battery Service (BAS)
[Experimental] Users should note that the APIs can change as a part of ongoing development.
#include <include/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/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. |