GAP based TOF Demo
Dependencies: BLE_API X_NUCLEO_6180XA1 mbed
Fork of BLE_HeartRate_IDB0XA1 by
bricks/callback.h@27:32267cee7cb8, 2017-01-14 (annotated)
- Committer:
- hux
- Date:
- Sat Jan 14 08:43:14 2017 +0000
- Revision:
- 27:32267cee7cb8
Setup a GATT Detector Service. There is some bug in the GATT setup, resulting in different behavior between Nordic nRF51822-DK and NUCLEO-L476RG, but with the workaround it works also for the NUCLEO board. (using Bricks V1A)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hux | 27:32267cee7cb8 | 1 | // callback.h - deal with callbacks |
hux | 27:32267cee7cb8 | 2 | // |
hux | 27:32267cee7cb8 | 3 | // |
hux | 27:32267cee7cb8 | 4 | #ifndef _CALLBACK_H_ |
hux | 27:32267cee7cb8 | 5 | #define _CALLBACK_H_ |
hux | 27:32267cee7cb8 | 6 | |
hux | 27:32267cee7cb8 | 7 | #include "bricks/o.h" |
hux | 27:32267cee7cb8 | 8 | |
hux | 27:32267cee7cb8 | 9 | void onConnect (O&o, void(*fptr)(O&o)); // setup connection callback |
hux | 27:32267cee7cb8 | 10 | void onDisconnect(O&o, void(*fptr)(O&o)); // setup disconnect callback |
hux | 27:32267cee7cb8 | 11 | void onWritten (O&o, void (*fptr)(O&)); // setup data written callback |
hux | 27:32267cee7cb8 | 12 | |
hux | 27:32267cee7cb8 | 13 | #endif // _CALLBACK_H_ |