Skip to content

BLE: Add reference of Battery service. #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 20, 2017
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions docs/reference/api/connectivity/bluetooth/BatteryService.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
## BatteryService

[Add description here.]
It is often a requirement for devices operating on battery to report the battery charge level to the user.

The <a href="https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245138" target="_blank">Bluetooth Battery Service</a> defines how to expose a battery charge level through a BLE link. It allows a client - usually a smartphone application - of a device to read the current battery charge level and follow its evolution.

The BatteryService class implements the Bluetooth Battery Service as defined by the Bluetooth SIG. Makers of BLE devices operating on battery can use the API to expose interoperably the charge level of their products.

### BatteryService class reference

[![View code](https://os.mbed.com/docs/v5.6/mbed-os-api-doxy/class_battery_service.html)
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/v5.6/mbed-os-api-doxy/class_battery_service.html)

### BatteryService example

[Add example here.]
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-BatteryLevel/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-BatteryLevel/file/5d8484f69181/source/main.cpp/)

### Related content

- <a href="https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245138" target="_blank">Bluetooth Battery Service</a> specification.