MouseScroll example from BLE_HID

Dependencies:   BLE_API BLE_HID mbed nRF51822

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

Revision:
4:8fb54802ba2b
Parent:
1:0a97297327eb
--- a/mouse_scroll.cpp	Thu Nov 19 15:17:41 2015 +0000
+++ b/mouse_scroll.cpp	Sun Apr 03 22:06:47 2016 +0100
@@ -108,9 +108,11 @@
     HID_DEBUG("setting up gap\r\n");
     ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::MOUSE);
     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();