TOF based Presence Detector
Dependencies: BLE_API X_NUCLEO_6180XA1 X_NUCLEO_IDB0XA1 mbed
Fork of BLE_HeartRate_IDB0XA1 by
bricks/updated.h
- Committer:
- hux
- Date:
- 2018-08-20
- Revision:
- 29:eceecbe28088
- Parent:
- 24:0f08f68579bd
File content as of revision 29:eceecbe28088:
// updated.h - check whether a characteristic has been updated // note: can only used within 'onWritten' callback // // Synopsis: // // See also: CHARACTERISTIC, GET, SET, ONWRITTEN // #ifndef _UPDATED_H_ #define _UPDATED_H_ #include "ble/Gap.h" #include "bricks/blob.h" inline int updated(Blob &o,GattCharacteristic &chr) // has char. been updated? { const GattWriteCallbackParams *p = o.pWritten; if (!p) return 0; // no update! else if(p->handle == chr.getValueHandle()) return 1; else return 0; } #endif // _SET_H_