High level Bluetooth Low Energy API and radio abstraction layer

Dependents:   BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate BLE_ANCS_SDAPI_IRC ... more

Overview

The BLE_API is a high level abstraction for using Bluetooth Low Energy on multiple platforms. For details and examples using the BLE_API please see the BLE_API Summary Page. Or click on the API Documentation tab above.

Supported Services

Supported services can be found in the BLE_API/services folder.

Revision:
734:4872b70437ce
Parent:
728:997ba5e7b3b6
Child:
740:8d52f0f8efd9
diff -r 718a3566b4ce -r 4872b70437ce ble/Gap.h
--- a/ble/Gap.h	Mon Jul 06 10:10:35 2015 +0100
+++ b/ble/Gap.h	Mon Jul 06 10:10:35 2015 +0100
@@ -154,6 +154,10 @@
      * @return BLE_ERROR_NONE on success.
      */
     virtual ble_error_t setAddress(AddressType_t type, const Address_t address) {
+        /* avoid compiler warnings about unused variables */
+        (void)type;
+        (void)address;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -163,6 +167,10 @@
      * @return BLE_ERROR_NONE on success.
      */
     virtual ble_error_t getAddress(AddressType_t *typeP, Address_t address) {
+        /* avoid compiler warnings about unused variables */
+        (void)typeP;
+        (void)address;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -219,6 +227,12 @@
                                 Gap::AddressType_t        peerAddrType,
                                 const ConnectionParams_t *connectionParams,
                                 const GapScanningParams  *scanParams) {
+        /* avoid compiler warnings about unused variables */
+        (void)peerAddr;
+        (void)peerAddrType;
+        (void)connectionParams;
+        (void)scanParams;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -231,6 +245,10 @@
      *           The reason for disconnection to be sent back to the peer.
      */
     virtual ble_error_t disconnect(Handle_t connectionHandle, DisconnectionReason_t reason) {
+        /* avoid compiler warnings about unused variables */
+        (void)connectionHandle;
+        (void)reason;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -248,6 +266,9 @@
      * altertive which takes a connection handle. It will be dropped in the future.
      */
     virtual ble_error_t disconnect(DisconnectionReason_t reason) {
+        /* avoid compiler warnings about unused variables */
+        (void)reason;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -264,6 +285,9 @@
      * the given structure pointed to by params.
      */
     virtual ble_error_t getPreferredConnectionParams(ConnectionParams_t *params) {
+        /* avoid compiler warnings about unused variables */
+        (void)params;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -276,6 +300,9 @@
      *               The structure containing the desired parameters.
      */
     virtual ble_error_t setPreferredConnectionParams(const ConnectionParams_t *params) {
+        /* avoid compiler warnings about unused variables */
+        (void)params;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -290,6 +317,10 @@
      *              the parameters in the PPCP characteristic of the GAP service will be used instead.
      */
     virtual ble_error_t updateConnectionParams(Handle_t handle, const ConnectionParams_t *params) {
+        /* avoid compiler warnings about unused variables */
+        (void)handle;
+        (void)params;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -299,6 +330,9 @@
      *              The new value for the device-name. This is a UTF-8 encoded, <b>NULL-terminated</b> string.
      */
     virtual ble_error_t setDeviceName(const uint8_t *deviceName) {
+        /* avoid compiler warnings about unused variables */
+        (void)deviceName;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -321,6 +355,10 @@
      *     use this information to retry with a suitable buffer size.
      */
     virtual ble_error_t getDeviceName(uint8_t *deviceName, unsigned *lengthP) {
+        /* avoid compiler warnings about unused variables */
+        (void)deviceName;
+        (void)lengthP;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -330,6 +368,9 @@
      *              The new value for the device-appearance.
      */
     virtual ble_error_t setAppearance(GapAdvertisingData::Appearance appearance) {
+        /* avoid compiler warnings about unused variables */
+        (void)appearance;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -339,6 +380,9 @@
      *               The new value for the device-appearance.
      */
     virtual ble_error_t getAppearance(GapAdvertisingData::Appearance *appearanceP) {
+        /* avoid compiler warnings about unused variables */
+        (void)appearanceP;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -347,6 +391,9 @@
      * @param[in] txPower Radio transmit power in dBm.
      */
     virtual ble_error_t setTxPower(int8_t txPower) {
+        /* avoid compiler warnings about unused variables */
+        (void)txPower;
+
         return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
     }
 
@@ -359,6 +406,10 @@
      *                 Out parameter to receive the array's size.
      */
     virtual void getPermittedTxPowerValues(const int8_t **valueArrayPP, size_t *countP) {
+        /* avoid compiler warnings about unused variables */
+        (void)valueArrayPP;
+        (void)countP;
+
         *countP = 0; /* default implementation; override this API if this capability is supported. */
     }