KeyboardStream example from BLE_HID

Dependencies:   BLE_API BLE_HID mbed nRF51822

This example is currently copied as-is from the github development repo.

Files at this revision

API Documentation at this revision

Comitter:
Jean-Philippe Brucker
Date:
Sun Apr 03 22:09:25 2016 +0100
Parent:
2:a0b9f9aa0e2d
Commit message:
v0.4 - small change to enable Win10 support

Changed in this revision

keyboard_stream.cpp Show annotated file Show diff for this revision Revisions of this file
version Show annotated file Show diff for this revision Revisions of this file
--- a/keyboard_stream.cpp	Thu Nov 19 15:16:43 2015 +0000
+++ b/keyboard_stream.cpp	Sun Apr 03 22:09:25 2016 +0100
@@ -116,9 +116,11 @@
     HID_DEBUG("setting up gap\r\n");
     ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::KEYBOARD);
     ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME,
-                                           (uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME));
+                                           (const uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME));
     ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::SHORTENED_LOCAL_NAME,
-                                           (uint8_t *)SHORT_DEVICE_NAME, sizeof(SHORT_DEVICE_NAME));
+                                           (const uint8_t *)SHORT_DEVICE_NAME, sizeof(SHORT_DEVICE_NAME));
+
+    ble.gap().setDeviceName((const uint8_t *)DEVICE_NAME);
 
     HID_DEBUG("advertising\r\n");
     ble.gap().startAdvertising();
--- a/version	Thu Nov 19 15:16:43 2015 +0000
+++ b/version	Sun Apr 03 22:09:25 2016 +0100
@@ -1,1 +1,1 @@
-0.3
+0.4