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: hw/BLEDevice.h
- Revision:
- 36:9ec94579bb78
- Parent:
- 35:f3b0c1192cf7
- Child:
- 37:7e8de07642e0
--- a/hw/BLEDevice.h Thu May 22 12:11:12 2014 +0100
+++ b/hw/BLEDevice.h Thu May 22 13:25:02 2014 +0100
@@ -37,35 +37,44 @@
/* GAP specific APIs */
public:
- ble_error_t setAddress(Gap::addr_type_t type, uint8_t address[6]) {
- return getGap().setAddress(type, address);
- }
+ ble_error_t setAddress(Gap::addr_type_t type, uint8_t address[6]);
ble_error_t setAdvertisingData(GapAdvertisingData &ADStructures,
- GapAdvertisingData &scanResponse) {
- return getGap().setAdvertisingData(ADStructures, scanResponse);
- }
-
- ble_error_t setAdvertisingData(GapAdvertisingData &ADStructures) {
- GapAdvertisingData scanResponse;
- return getGap().setAdvertisingData(ADStructures, scanResponse);
- }
-
- ble_error_t startAdvertising(GapAdvertisingParams &advParams) {
- return getGap().startAdvertising(advParams);
- }
-
- ble_error_t stopAdvertising(void) {
- return getGap().stopAdvertising();
- }
-
- ble_error_t disconnect(void) {
- return getGap().disconnect();
- }
+ GapAdvertisingData &scanResponse);
+ ble_error_t setAdvertisingData(GapAdvertisingData &ADStructures);
+ ble_error_t startAdvertising(GapAdvertisingParams &advParams);
+ ble_error_t stopAdvertising(void);
+ ble_error_t disconnect(void);
public: /* TODO: to be made private soon */
virtual Gap& getGap() = 0;
virtual GattServer& getGattServer() = 0;
};
+inline ble_error_t BLEDevice::setAddress(Gap::addr_type_t type, uint8_t address[6]) {
+ return getGap().setAddress(type, address);
+}
+
+inline ble_error_t BLEDevice::setAdvertisingData(GapAdvertisingData &ADStructures,
+ GapAdvertisingData &scanResponse) {
+ return getGap().setAdvertisingData(ADStructures, scanResponse);
+}
+
+inline ble_error_t BLEDevice::setAdvertisingData(GapAdvertisingData &ADStructures) {
+ GapAdvertisingData scanResponse;
+ return getGap().setAdvertisingData(ADStructures, scanResponse);
+}
+
+inline ble_error_t BLEDevice::startAdvertising(GapAdvertisingParams &advParams) {
+ return getGap().startAdvertising(advParams);
+}
+
+inline ble_error_t BLEDevice::stopAdvertising(void) {
+ return getGap().stopAdvertising();
+}
+
+inline ble_error_t BLEDevice::disconnect(void) {
+ return getGap().disconnect();
+}
+
#endif // ifndef __BLE_DEVICE_H__
