service_battery.h
service_battery.h provides an easy way to implement battery service.
service_mesh.h
service_mesh.h provides an easy way to implement mesh service.
◆ BAS_init()
void BAS_init |
( |
bool |
support_notification | ) |
|
Initialization function of battery service.
- Parameters
-
support_notification | 1:support/0:not support. |
- Returns
- None.
◆ BAS_update_battery_level()
void BAS_update_battery_level |
( |
uint8_t |
level, |
|
|
bool |
notify_after_update |
|
) |
| |
Update battery level.
- Parameters
-
level | Battery level. Valid range: 0~100 |
notify_after_update | 1:Update battery level and use notification procedure to notify GATT client.
0:Update battery level characteristic value. |
- Returns
- None.