Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Hello_BLE F446RE-BLE
Fork of X_NUCLEO_IDB0XA1 by
Diff: btle/src/btle.cpp
- Revision:
- 20:718d56821672
- Parent:
- 14:baa7a1464517
- Child:
- 23:72e56ddfad5b
--- a/btle/src/btle.cpp Fri Aug 08 10:53:18 2014 +0000 +++ b/btle/src/btle.cpp Wed Aug 13 08:14:50 2014 +0000 @@ -20,6 +20,7 @@ #include "hw/GapEvents.h" #include "BlueNRGGap.h" #include "BlueNRGGattServer.h" +#include "Utils.h" #ifdef __cplusplus extern "C" { @@ -65,7 +66,7 @@ /**************************************************************************/ /*! - @brief Initialises BTLE and the underlying HW/SoftDevice + @brief Initialises BTLE and the underlying HW/Device @returns */ @@ -203,9 +204,30 @@ case EVT_BLUE_GATT_READ_PERMIT_REQ: { //evt_gatt_read_permit_req *pr = (void*)blue_evt->data; - //Read_Request_CB(pr->attr_handle); + //Read_Request_CB(pr->attr_handle); + DEBUG("EVT_BLUE_GATT_READ_PERMIT_REQ\n\r"); } break; + + case EVT_BLUE_GATT_ATTRIBUTE_MODIFIED: + { + /* this callback is invoked when a GATT attribute is modified + extract callback data and pass to suitable handler function */ + evt_gatt_attr_modified *evt = (evt_gatt_attr_modified*)blue_evt->data; + DEBUG("EVT_BLUE_GATT_ATTRIBUTE_MODIFIED\n\r"); + + DEBUG("CharHandle 0x%x, Data: 0x%x\n\r",evt->attr_handle, evt->att_data); + //Attribute_Modified_CB(evt->attr_handle, evt->data_length, evt->att_data); + } + break; + + //Any cases for Data Sent Notifications? + case EVT_BLUE_GATT_NOTIFICATION: + DEBUG("EVT_BLUE_GATT_NOTIFICATION"); + break; + case EVT_BLUE_GATT_INDICATION: + DEBUG("EVT_BLUE_GATT_INDICATION"); + break; } } break;