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: btle/btle.cpp
- Revision:
- 167:66ee4f876396
- Parent:
- 165:67fcad70785a
- Child:
- 179:10e4c13360d9
diff -r fa0e88cac390 -r 66ee4f876396 btle/btle.cpp
--- a/btle/btle.cpp Wed May 13 08:49:34 2015 +0100
+++ b/btle/btle.cpp Wed May 13 08:49:34 2015 +0100
@@ -165,21 +165,14 @@
case BLE_GAP_EVT_ADV_REPORT: {
const ble_gap_evt_adv_report_t *advReport = &p_ble_evt->evt.gap_evt.params.adv_report;
- printf("GAP ADV Report [%02x %02x %02x %02x %02x %02x]\r\n",
- advReport->peer_addr.addr[0], advReport->peer_addr.addr[1], advReport->peer_addr.addr[2],
- advReport->peer_addr.addr[3], advReport->peer_addr.addr[4], advReport->peer_addr.addr[5]);
+ nRF51Gap::getInstance().processAdvertisementReport(advReport->peer_addr.addr,
+ advReport->rssi,
+ advReport->scan_rsp,
+ static_cast<Gap::AdvertisementType_t>(advReport->type),
+ advReport->dlen,
+ advReport->data);
+ break;
}
- // typedef struct
- // {
- // ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. */
- // int8_t rssi; /**< Received Signal Strength Indication in dBm. */
- // uint8_t scan_rsp : 1; /**< If 1, the report corresponds to a scan response and the type field may be ignored. */
- // uint8_t type : 2; /**< See @ref BLE_GAP_ADV_TYPES. Only valid if the scan_rsp field is 0. */
- // uint8_t dlen : 5; /**< Advertising or scan response data length. */
- // uint8_t data[BLE_GAP_ADV_MAX_SIZE]; /**< Advertising or scan response data. */
- // } ble_gap_evt_adv_report_t;
- // .peer_addr
- break;
default:
break;
