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.
Dependencies: nrf51-sdk-bluetooth-mdw
Fork of nRF51822 by
Diff: source/btle/btle.cpp
- Revision:
- 399:a471c3da4806
- Parent:
- 393:0f7c5048efb3
- Child:
- 402:448a564f5c9e
diff -r b1dbc4eb89a9 -r a471c3da4806 source/btle/btle.cpp
--- a/source/btle/btle.cpp Fri Aug 07 15:57:07 2015 +0100
+++ b/source/btle/btle.cpp Fri Aug 07 15:57:07 2015 +0100
@@ -113,12 +113,18 @@
switch (p_ble_evt->header.evt_id) {
case BLE_GAP_EVT_CONNECTED: {
Gap::Handle_t handle = p_ble_evt->evt.gap_evt.conn_handle;
+#if defined(MCU_NORDIC_16K_S110) || defined(MCU_NORDIC_32K_S110)
+ /* Only peripheral role is supported by S110 */
+ Gap::Role_t role = Gap::PERIPHERAL;
+#else
+ Gap::Role_t role = static_cast<Gap::Role_t>(p_ble_evt->evt.gap_evt.params.connected.role);
+#endif
nRF5xGap::getInstance().setConnectionHandle(handle);
const Gap::ConnectionParams_t *params = reinterpret_cast<Gap::ConnectionParams_t *>(&(p_ble_evt->evt.gap_evt.params.connected.conn_params));
const ble_gap_addr_t *peer = &p_ble_evt->evt.gap_evt.params.connected.peer_addr;
const ble_gap_addr_t *own = &p_ble_evt->evt.gap_evt.params.connected.own_addr;
nRF5xGap::getInstance().processConnectionEvent(handle,
- static_cast<Gap::Role_t>(p_ble_evt->evt.gap_evt.params.connected.role),
+ role,
static_cast<Gap::AddressType_t>(peer->addr_type), peer->addr,
static_cast<Gap::AddressType_t>(own->addr_type), own->addr,
params);
