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:
- 103:8890715aaf55
- Parent:
- 102:39e30ac179a7
- Child:
- 104:6ef5abef5714
--- a/hw/BLEDevice.h Wed Jul 09 09:07:37 2014 +0100
+++ b/hw/BLEDevice.h Wed Jul 09 09:08:53 2014 +0100
@@ -184,6 +184,16 @@
ble_error_t accumulateAdvertisingPayload(GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len);
/**
+ * Accumulate a variable length byte-stream as an AD structure in the
+ * scanResponse payload.
+ *
+ * @param type The type which describes the variable length data.
+ * @param data data bytes.
+ * @param len length of data.
+ */
+ ble_error_t accumulateScanResponse(GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len);
+
+ /**
* Start advertising (GAP Discoverable, Connectable modes, Broadcast
* Procedure).
*/
@@ -356,13 +366,20 @@
}
inline ble_error_t
-BLEDevice::accumulateAdvertisingPayload(GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len)
+BLEDevice::accumulateAdvertisingPayload(GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len)
{
needToSetAdvPayload = true;
return advPayload.addData(type, data, len);
}
inline ble_error_t
+BLEDevice::accumulateScanResponse(GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len)
+{
+ needToSetAdvPayload = true;
+ return scanResponse.addData(type, data, len);
+}
+
+inline ble_error_t
BLEDevice::setAdvertisingPayload(void) {
needToSetAdvPayload = false;
return transport->getGap().setAdvertisingData(advPayload, scanResponse);
