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:
- 4:fa5b5693c1b5
- Parent:
- 3:9c4c13795643
- Child:
- 6:08cfc94b5f49
--- a/btle/src/btle.cpp Mon Jul 21 14:10:22 2014 +0000
+++ b/btle/src/btle.cpp Tue Jul 22 09:20:20 2014 +0000
@@ -16,6 +16,10 @@
#include "btle.h"
+#include "hw/Gap.h"
+#include "hw/GapEvents.h"
+#include "BlueNRGGap.h"
+#include "BlueNRGGattServer.h"
#ifdef __cplusplus
extern "C" {
@@ -162,7 +166,7 @@
case EVT_DISCONN_COMPLETE:
{
- //GAP_DisconnectionComplete_CB();
+ BlueNRGGap::getInstance().handleEvent(GapEvents::GAP_EVENT_DISCONNECTED);
}
break;
@@ -172,9 +176,12 @@
switch(evt->subevent){
case EVT_LE_CONN_COMPLETE:
- {
- //evt_le_connection_complete *cc = (void *)evt->data;
- //GAP_ConnectionComplete_CB(cc->peer_bdaddr, cc->handle);
+ {
+ evt_le_connection_complete *cc = (evt_le_connection_complete *)evt->data;
+
+ BlueNRGGap::getInstance().setConnectionHandle(cc->handle);
+ BlueNRGGap::getInstance().handleEvent(GapEvents::GAP_EVENT_CONNECTED);
+
}
break;
}
