High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Revision:
1079:6e2d9514f3df
Parent:
1078:79c089630b38
Child:
1082:127667021827
--- a/ble/Gap.h	Mon Jan 11 08:51:44 2016 +0000
+++ b/ble/Gap.h	Mon Jan 11 08:51:44 2016 +0000
@@ -97,12 +97,12 @@
     };
 
     struct AdvertisementCallbackParams_t {
-        Address_t            peerAddr;
-        int8_t               rssi;
-        bool                 isScanResponse;
-        GapAdvertisingParams::AdvertisingType_t type;
-        uint8_t              advertisingDataLen;
-        const uint8_t       *advertisingData;
+        BLEProtocol::Address_t                   peerAddr;
+        int8_t                                   rssi;
+        bool                                     isScanResponse;
+        GapAdvertisingParams::AdvertisingType_t  type;
+        uint8_t                                  advertisingDataLen;
+        const uint8_t                           *advertisingData;
     };
     typedef FunctionPointerWithContext<const AdvertisementCallbackParams_t *> AdvertisementReportCallback_t;
 
@@ -110,9 +110,9 @@
         Handle_t                    handle;
         Role_t                      role;
         BLEProtocol::AddressType_t  peerAddrType;
-        Address_t                   peerAddr;
+        BLEProtocol::Address_t      peerAddr;
         BLEProtocol::AddressType_t  ownAddrType;
-        Address_t                   ownAddr;
+        BLEProtocol::Address_t      ownAddr;
         const ConnectionParams_t   *connectionParams;
 
         ConnectionCallbackParams_t(Handle_t                    handleIn,
@@ -167,11 +167,11 @@
 public:
     /**
      * Set the BTLE MAC address and type. Please note that the address format is
-     * least significant byte first (LSB). Please refer to Address_t.
+     * least significant byte first (LSB). Please refer to BLEProtocol::Address_t.
      *
      * @return BLE_ERROR_NONE on success.
      */
-    virtual ble_error_t setAddress(BLEProtocol::AddressType_t type, const Address_t address) {
+    virtual ble_error_t setAddress(BLEProtocol::AddressType_t type, const BLEProtocol::Address_t address) {
         /* avoid compiler warnings about unused variables */
         (void)type;
         (void)address;
@@ -184,7 +184,7 @@
      *
      * @return BLE_ERROR_NONE on success.
      */
-    virtual ble_error_t getAddress(BLEProtocol::AddressType_t *typeP, Address_t address) {
+    virtual ble_error_t getAddress(BLEProtocol::AddressType_t *typeP, BLEProtocol::Address_t address) {
         /* Avoid compiler warnings about unused variables. */
         (void)typeP;
         (void)address;
@@ -243,10 +243,10 @@
      *     successfully. The connectionCallChain (if set) will be invoked upon
      *     a connection event.
      */
-    virtual ble_error_t connect(const Address_t             peerAddr,
-                                BLEProtocol::AddressType_t  peerAddrType,
-                                const ConnectionParams_t   *connectionParams,
-                                const GapScanningParams    *scanParams) {
+    virtual ble_error_t connect(const BLEProtocol::Address_t  peerAddr,
+                                BLEProtocol::AddressType_t    peerAddrType,
+                                const ConnectionParams_t     *connectionParams,
+                                const GapScanningParams      *scanParams) {
         /* Avoid compiler warnings about unused variables. */
         (void)peerAddr;
         (void)peerAddrType;
@@ -1012,13 +1012,13 @@
 
     /* Entry points for the underlying stack to report events back to the user. */
 public:
-    void processConnectionEvent(Handle_t                    handle,
-                                Role_t                      role,
-                                BLEProtocol::AddressType_t  peerAddrType,
-                                const Address_t             peerAddr,
-                                BLEProtocol::AddressType_t  ownAddrType,
-                                const Address_t             ownAddr,
-                                const ConnectionParams_t   *connectionParams) {
+    void processConnectionEvent(Handle_t                      handle,
+                                Role_t                        role,
+                                BLEProtocol::AddressType_t    peerAddrType,
+                                const BLEProtocol::Address_t  peerAddr,
+                                BLEProtocol::AddressType_t    ownAddrType,
+                                const BLEProtocol::Address_t  ownAddr,
+                                const ConnectionParams_t     *connectionParams) {
         state.connected = 1;
         ConnectionCallbackParams_t callbackParams(handle, role, peerAddrType, peerAddr, ownAddrType, ownAddr, connectionParams);
         connectionCallChain.call(&callbackParams);
@@ -1030,12 +1030,12 @@
         disconnectionCallChain.call(&callbackParams);
     }
 
-    void processAdvertisementReport(const Address_t    peerAddr,
-                                    int8_t             rssi,
-                                    bool               isScanResponse,
+    void processAdvertisementReport(const BLEProtocol::Address_t             peerAddr,
+                                    int8_t                                   rssi,
+                                    bool                                     isScanResponse,
                                     GapAdvertisingParams::AdvertisingType_t  type,
-                                    uint8_t            advertisingDataLen,
-                                    const uint8_t     *advertisingData) {
+                                    uint8_t                                  advertisingDataLen,
+                                    const uint8_t                           *advertisingData) {
         AdvertisementCallbackParams_t params;
         memcpy(params.peerAddr, peerAddr, ADDR_LEN);
         params.rssi               = rssi;