Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
Diff: public/BLEDevice.h
- Revision:
- 123:fede41ce9407
- Parent:
- 121:035516234a33
- Child:
- 126:fdebe4d5d62f
--- a/public/BLEDevice.h Tue Sep 30 01:03:56 2014 +0100 +++ b/public/BLEDevice.h Wed Nov 05 14:08:42 2014 +0000 @@ -41,9 +41,15 @@ public: /** * Set the BTLE MAC address and type. - * @return + * @return BLE_ERROR_NONE on success. */ - ble_error_t setAddress(Gap::addr_type_t type, const uint8_t address[6]); + ble_error_t setAddress(Gap::addr_type_t type, const uint8_t address[Gap::ADDR_LEN]); + + /** + * Fetch the BTLE MAC address and type. + * @return BLE_ERROR_NONE on success. + */ + ble_error_t getAddress(Gap::addr_type_t *typeP, uint8_t address[Gap::ADDR_LEN]); /** * @param[in] advType @@ -360,11 +366,17 @@ } inline ble_error_t -BLEDevice::setAddress(Gap::addr_type_t type, const uint8_t address[6]) +BLEDevice::setAddress(Gap::addr_type_t type, const uint8_t address[Gap::ADDR_LEN]) { return transport->getGap().setAddress(type, address); } +inline ble_error_t +BLEDevice::getAddress(Gap::addr_type_t *typeP, uint8_t address[Gap::ADDR_LEN]) +{ + return transport->getGap().getAddress(typeP, address); +} + inline void BLEDevice::setAdvertisingType(GapAdvertisingParams::AdvertisingType advType) {