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: mbed BLE_API Adafruit_GFX nRF51822
Diff: main.cpp
- Revision:
- 3:50a7d47912b2
- Parent:
- 0:332983584a9c
- Child:
- 4:dd8231564124
--- a/main.cpp Wed May 13 07:56:30 2015 +0000
+++ b/main.cpp Mon May 18 09:04:39 2015 +0000
@@ -25,18 +25,14 @@
led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */
}
-void advertisementCallback(const Gap::address_t peerAddr,
- int8_t rssi,
- bool isScanResponse,
- Gap::AdvertisementType_t type,
- uint8_t advertisingDataLen,
- const uint8_t *advertisingData) {
+void advertisementCallback(const Gap::AdvertisementCallbackParams_t *params) {
+
printf("Adv peerAddr: [%02x %02x %02x %02x %02x %02x] rssi %d, ScanResp: %u, AdvType: %u\r\n",
- peerAddr[5], peerAddr[4], peerAddr[3], peerAddr[2], peerAddr[1], peerAddr[0], rssi, isScanResponse, type);
+ params->peerAddr[5], params->peerAddr[4], params->peerAddr[3], params->peerAddr[2], params->peerAddr[1], params->peerAddr[0],
+ params->rssi, params->isScanResponse, params->type);
#if DUMP_ADV_DATA
- unsigned index = 0;
- for (; index < advertisingDataLen; index++) {
- printf("%02x ", advertisingData[index]);
+ for (unsigned index = 0; index < params->advertisingDataLen; index++) {
+ printf("%02x ", params->advertisingData[index]);
}
printf("\r\n");
#endif /* DUMP_ADV_DATA */