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.
Diff: ble/Gap.h
- Revision:
- 1190:38d206267ad3
- Parent:
- 1189:740911150041
- Child:
- 1191:c8635748feec
--- a/ble/Gap.h Wed Apr 06 19:15:43 2016 +0100 +++ b/ble/Gap.h Wed Apr 06 19:15:44 2016 +0100 @@ -1118,12 +1118,11 @@ */ ble_error_t setAdvertisingPayload(const GapAdvertisingData &payload) { ble_error_t rc = setAdvertisingData(_advPayload, _scanResponse); - if (rc != BLE_ERROR_NONE) { - /* The payload has a problem, do not store it */ - return rc; + if (rc == BLE_ERROR_NONE) { + _advPayload = payload; } - _advPayload = payload; - return BLE_ERROR_NONE; + + return rc; } /**