ble nano hid over gatt
Dependencies: BLE_API mbed-dev nRF51822
Diff: HIDController_BLE.cpp
- Revision:
- 85:e526a89a0674
- Parent:
- 84:b917922bb5f1
- Child:
- 86:e0fab77e669d
--- a/HIDController_BLE.cpp Sun Sep 04 17:22:20 2016 +0900 +++ b/HIDController_BLE.cpp Thu Sep 15 08:48:57 2016 +0900 @@ -6,6 +6,7 @@ #include "KeyboardService.h" #include "BatteryService.h" #include "DeviceInformationService.h" +#include "ScanParametersService.h" #include "DFUService.h" #include "HIDController_BLE.h" @@ -29,14 +30,13 @@ static const uint8_t PASSKEY[6] = {'1','2','3','4','5','6'}; // must be 6-digits number static const uint16_t uuid16_list[] = { - GattService::UUID_HUMAN_INTERFACE_DEVICE_SERVICE, - GattService::UUID_DEVICE_INFORMATION_SERVICE, - GattService::UUID_BATTERY_SERVICE + GattService::UUID_HUMAN_INTERFACE_DEVICE_SERVICE }; static KeyboardService* keyboardService; static BatteryService* batteryService; static DeviceInformationService* deviceInformationService; +static ScanParametersService* scanParametersService; // static DFUService* dfuService; @@ -173,6 +173,8 @@ deviceInformationService = new DeviceInformationService(ble, MANUFACTURERERS_NAME, MODEL_NAME, SERIAL_NUMBER, HARDWARE_REVISION, FIRMWARE_REVISION, SOFTWARE_REVISION, &PNP_ID); DEBUG_PRINTF_BLE("new BatteryService\r\n"); batteryService = new BatteryService(ble, 100); + DEBUG_PRINTF_BLE("new ScanParametersService\r\n"); + scanParametersService = new ScanParametersService(ble); /** TODO DEBUG_PRINTF_BLE("new DFUService\r\n"); dfuService = new DFUService(ble);