Minor temporary patch to allow DFU packet callback

Fork of BLE_API by Bluetooth Low Energy

Revision:
277:1407d2f1ce3c
Parent:
243:98f930d14515
Child:
338:fd32ec0ebd98
diff -r daa42f59bdb8 -r 1407d2f1ce3c services/HeartRateService.h
--- a/services/HeartRateService.h	Thu Jan 22 09:59:43 2015 +0000
+++ b/services/HeartRateService.h	Thu Jan 22 09:59:44 2015 +0000
@@ -59,10 +59,8 @@
         hrmRate(GattCharacteristic::UUID_HEART_RATE_MEASUREMENT_CHAR, valueBytes.getPointer(),
                 valueBytes.getNumValueBytes(), HeartRateValueBytes::MAX_VALUE_BYTES,
                 GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
-        hrmLocation(GattCharacteristic::UUID_BODY_SENSOR_LOCATION_CHAR, (uint8_t *)&location, sizeof(location), sizeof(location),
-                    GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ),
-        controlPoint(GattCharacteristic::UUID_HEART_RATE_CONTROL_POINT_CHAR, (uint8_t *)&controlPointValue,
-                     sizeof(controlPointValue), sizeof(controlPointValue), GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE) {
+        hrmLocation(GattCharacteristic::UUID_BODY_SENSOR_LOCATION_CHAR, &location),
+        controlPoint(GattCharacteristic::UUID_HEART_RATE_CONTROL_POINT_CHAR, &controlPointValue) {
         setupService();
     }
 
@@ -82,10 +80,8 @@
         hrmRate(GattCharacteristic::UUID_HEART_RATE_MEASUREMENT_CHAR, valueBytes.getPointer(),
                 valueBytes.getNumValueBytes(), HeartRateValueBytes::MAX_VALUE_BYTES,
                 GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
-        hrmLocation(GattCharacteristic::UUID_BODY_SENSOR_LOCATION_CHAR, (uint8_t *)&location, sizeof(location), sizeof(location),
-                    GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ),
-        controlPoint(GattCharacteristic::UUID_HEART_RATE_CONTROL_POINT_CHAR, (uint8_t *)&controlPointValue,
-                     sizeof(controlPointValue), sizeof(controlPointValue), GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE) {
+        hrmLocation(GattCharacteristic::UUID_BODY_SENSOR_LOCATION_CHAR, &location),
+        controlPoint(GattCharacteristic::UUID_HEART_RATE_CONTROL_POINT_CHAR, &controlPointValue) {
         setupService();
     }
 
@@ -193,11 +189,13 @@
 
 private:
     BLEDevice           &ble;
+
     HeartRateValueBytes  valueBytes;
     uint8_t              controlPointValue;
-    GattCharacteristic   hrmRate;
-    GattCharacteristic   hrmLocation;
-    GattCharacteristic   controlPoint;
+
+    GattCharacteristic                   hrmRate;
+    ReadOnlyGattCharacteristic<uint8_t>  hrmLocation;
+    WriteOnlyGattCharacteristic<uint8_t> controlPoint;
 };
 
 #endif /* #ifndef __BLE_HEART_RATE_SERVICE_H__*/
\ No newline at end of file