fork BLE_API to add update adv payload API
Fork of BLE_API by
Diff: services/BatteryService.h
- Revision:
- 671:33ec93d25695
- Parent:
- 669:7179b4a5aa7d
- Child:
- 710:b2e1a2660ec2
--- a/services/BatteryService.h Fri Jun 19 15:53:01 2015 +0100 +++ b/services/BatteryService.h Fri Jun 19 15:53:01 2015 +0100 @@ -17,7 +17,7 @@ #ifndef __BLE_BATTERY_SERVICE_H__ #define __BLE_BATTERY_SERVICE_H__ -#include "BLEDevice.h" +#include "BLE.h" /** * @class BatteryService @@ -29,11 +29,11 @@ public: /** * @param[ref] _ble - * BLEDevice object for the underlying controller. + * BLE object for the underlying controller. * @param[in] level * 8bit batterly level. Usually used to represent percentage of batterly charge remaining. */ - BatteryService(BLEDevice &_ble, uint8_t level = 100) : + BatteryService(BLE &_ble, uint8_t level = 100) : ble(_ble), batteryLevel(level), batteryLevelCharacteristic(GattCharacteristic::UUID_BATTERY_LEVEL_CHAR, &batteryLevel, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY) { @@ -57,7 +57,7 @@ } protected: - BLEDevice &ble; + BLE &ble; uint8_t batteryLevel; ReadOnlyGattCharacteristic<uint8_t> batteryLevelCharacteristic;