xiao sun / BLE_API

Fork of BLE_API by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
Rohit Grover
Date:
Thu May 22 13:30:05 2014 +0100
Parent:
37:7e8de07642e0
Child:
39:a57137537521
Commit message:
add consts to the declaration of BLEDevice::setAddress()

Changed in this revision

hw/BLEDevice.h Show annotated file Show diff for this revision Revisions of this file
hw/Gap.h Show annotated file Show diff for this revision Revisions of this file
--- a/hw/BLEDevice.h	Thu May 22 13:25:24 2014 +0100
+++ b/hw/BLEDevice.h	Thu May 22 13:30:05 2014 +0100
@@ -41,7 +41,7 @@
      * Set the BTLE MAC address and type.
      * @return
      */
-    ble_error_t setAddress(Gap::addr_type_t type, uint8_t address[6]);
+    ble_error_t setAddress(Gap::addr_type_t type, const uint8_t address[6]);
 
     ble_error_t setAdvertisingData(GapAdvertisingData &ADStructures,
                                    GapAdvertisingData &scanResponse);
@@ -55,7 +55,7 @@
     virtual GattServer& getGattServer() = 0;
 };
 
-inline ble_error_t BLEDevice::setAddress(Gap::addr_type_t type, uint8_t address[6]) {
+inline ble_error_t BLEDevice::setAddress(Gap::addr_type_t type, const uint8_t address[6]) {
     return getGap().setAddress(type, address);
 }
 
--- a/hw/Gap.h	Thu May 22 13:25:24 2014 +0100
+++ b/hw/Gap.h	Thu May 22 13:30:05 2014 +0100
@@ -44,7 +44,7 @@
     } addr_type_t;
 
     /* These functions must be defined in the sub-class */
-    virtual ble_error_t setAddress(addr_type_t type, uint8_t address[6]) = 0;
+    virtual ble_error_t setAddress(addr_type_t type, const uint8_t address[6]) = 0;
     virtual ble_error_t setAdvertisingData(GapAdvertisingData &,
                                            GapAdvertisingData &) = 0;
     virtual ble_error_t startAdvertising(GapAdvertisingParams &) = 0;