UpdatedDecryp

Dependencies:   BahlDecrypModified CyaSSL mbed nRF51822

Fork of Decryptulator by Mobius IoT

Revision:
3:50a7d47912b2
Parent:
0:332983584a9c
Child:
4:dd8231564124
diff -r e38ee32ba685 -r 50a7d47912b2 main.cpp
--- 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 */