High level Bluetooth Low Energy API and radio abstraction layer
Fork of BLE_API by
Revision 243:98f930d14515, committed 2014-12-09
- Comitter:
- rgrover1
- Date:
- Tue Dec 09 13:15:19 2014 +0000
- Parent:
- 242:0e9201b67e2f
- Child:
- 244:aa639ef2f290
- Commit message:
- Synchronized with git rev ba5fb7fb
Author: Rohit Grover
minor improvements to documentation.
Changed in this revision
--- a/services/DFUService.h Tue Dec 09 08:18:11 2014 +0000 +++ b/services/DFUService.h Tue Dec 09 13:15:19 2014 +0000 @@ -81,11 +81,10 @@ } /** - * @brief - * @return + * @brief get the handle for the value attribute of the control characteristic. */ - uint16_t getControlHandle(void) { - return controlPoint.getValueAttribute().getHandle(); + uint16_t getControlHandle(void) const { + return controlPoint.getValueHandle(); } /** @@ -93,8 +92,8 @@ * handover control to the bootloader; but first the application is given a * chance to clean up. * - * @param[in] - * + * @param[in] params + * Information about the characterisitc being updated. */ virtual void onDataWritten(const GattCharacteristicWriteCBParams *params) { if (params->charHandle == controlPoint.getValueAttribute().getHandle()) {
--- a/services/HealthThermometerService.h Tue Dec 09 08:18:11 2014 +0000 +++ b/services/HealthThermometerService.h Tue Dec 09 13:15:19 2014 +0000 @@ -32,7 +32,7 @@ * @enum Sensor Location * @brief Location of sensor on the body */ - enum { + enum SensorLocation_t { LOCATION_ARMPIT = 1, /*!< armpit */ LOCATION_BODY, /*!< body */ LOCATION_EAR, /*!< ear */ @@ -80,6 +80,15 @@ } } + /** + * @brief Update the location. + * @param loc + * new location value. + */ + void updateLocation(SensorLocation_t loc) { + ble.updateCharacteristicValue(tempLocation.getValueHandle(), reinterpret_cast<uint8_t *>(&loc), sizeof(uint8_t)); + } + private: /* Private internal representation for the bytes used to work with the vaulue of the heart-rate characteristic. */ struct TemperatureValueBytes {
--- a/services/HeartRateService.h Tue Dec 09 08:18:11 2014 +0000 +++ b/services/HeartRateService.h Tue Dec 09 13:15:19 2014 +0000 @@ -115,6 +115,8 @@ * This callback allows the HeartRateService to receive updates to the * controlPoint Characteristic. * + * @param[in] params + * Information about the characterisitc being updated. */ virtual void onDataWritten(const GattCharacteristicWriteCBParams *params) { if (params->charHandle == controlPoint.getValueAttribute().getHandle()) {