Hiroh Satoh / keyboard Featured

Dependencies:   BLE_API mbed-dev nRF51822

Revision:
48:d6938de02f62
Parent:
47:5bf2ae8cc710
Child:
50:c1382a0ff066
--- a/HIDController_BLE.cpp	Mon Aug 29 12:38:32 2016 +0000
+++ b/HIDController_BLE.cpp	Mon Aug 29 14:09:09 2016 +0000
@@ -15,7 +15,7 @@
 static const char SOFTWARE_REVISION[] = "0.0";
 
 static const uint8_t DEVICE_NAME[] = "Keble";
-static const uint8_t SHORT_DEVICE_NAME[] = "Keble";
+// static const uint8_t SHORT_DEVICE_NAME[] = "Keble";
 
 static const bool ENABLE_BONDING = true;
 static const bool REQUIRE_MITM = true;
@@ -30,7 +30,7 @@
 static KeyboardService* keyboardService;
 static BatteryService* batteryService;
 static DeviceInformationService* deviceInformationService;
-static DFUService* dfuService;
+// static DFUService* dfuService;
 
 static BLEProtocol::Address_t peerAddress;
 
@@ -256,13 +256,13 @@
 	ble.waitForEvent();
 }
 
-void HIDController::appendReportData(uint8_t key) {
+void HIDController::appendReportData(const uint8_t key) {
 	if (keyboardService) {
 		keyboardService->appendReportData(key);
 	}
 }
 
-void HIDController::deleteReportData(uint8_t key) {
+void HIDController::deleteReportData(const uint8_t key) {
 	if (keyboardService) {
 		keyboardService->deleteReportData(key);
 	}
@@ -276,12 +276,12 @@
 	}
 }
 
-void HIDController::updateBatteryLevel(uint8_t percentage) {
+void HIDController::updateBatteryLevel(const uint8_t percentage) {
 	if (!batteryService) return;
 	batteryService->updateBatteryLevel(percentage);
 }
 
-void HIDController::initializeConnection(bool ignoreWhiteList = false) {
+void HIDController::initializeConnection(const bool ignoreWhiteList = false) {
 	ble_error_t error;
 	BLE& ble = BLE::Instance(BLE::DEFAULT_INSTANCE);
 	ble.gap().setAdvertisingInterval(20);