add consts to the declaration of BLEDevice::setAddress()
parent
789bd6f6c0
commit
3541e6ff6f
|
@ -41,7 +41,7 @@ public:
|
|||
* 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 @@ public: /* TODO: to be made private soon */
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
2
hw/Gap.h
2
hw/Gap.h
|
@ -44,7 +44,7 @@ public:
|
|||
} 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;
|
||||
|
|
Loading…
Reference in New Issue