Bluetooth Connected TOF Sensor
Dependencies: BLE_API X_NUCLEO_6180XA1 X_NUCLEO_IDB0XA1 mbed
Fork of BLE_HeartRate_IDB0XA1 by
Diff: bricks/set.h
- Revision:
- 28:def5e0f0fb06
- Parent:
- 27:32267cee7cb8
diff -r 32267cee7cb8 -r def5e0f0fb06 bricks/set.h --- a/bricks/set.h Sat Jan 14 08:43:14 2017 +0000 +++ b/bricks/set.h Wed Feb 01 22:08:56 2017 +0000 @@ -27,6 +27,12 @@ o.gattServer().write(chr.getValueHandle(), (uint8_t*)&data,size); } + inline void set(O&o, Characteristic<Int> &chr, const Int &data) + { + uint16_t size = sizeof(Int)/sizeof(uint8_t); + o.gattServer().write(chr.getValueHandle(), (uint8_t*)&data,size); + } + inline void set(O&o, Characteristic<ObjectId> &chr, const ObjectId &data) { uint16_t size = sizeof(ObjectId)/sizeof(uint8_t);