A nice BLE demo program which allows remote switch of an LED via GATT interface.

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_Button by Bluetooth Low Energy

bricks/callback.h

Committer:
hux
Date:
2017-10-21
Revision:
13:0563f1aa6a75
Parent:
12:0d0ca44397dd

File content as of revision 13:0563f1aa6a75:

// callback.h - deal with callbacks
//
//
#ifndef _CALLBACK_H_
#define _CALLBACK_H_

#include "bricks/o.h"

   void onConnect   (O&o, void(*fptr)(O&o));   // setup connection callback
   void onDisconnect(O&o, void(*fptr)(O&o));   // setup disconnect callback
   void onWritten   (O&o, void (*fptr)(O&));   // setup data written callback

#endif // _CALLBACK_H_