8000 Update example "BLE_SimplePeripheral", add DFUService. · RedBearLab/nRF51822-Arduino@ccbbfcf · GitHub
[go: up one dir, main page]

Skip to content

Commit ccbbfcf

Browse files
author
jixing.zou
committed
Update example "BLE_SimplePeripheral", add DFUService.
1 parent 088cadd commit ccbbfcf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arduino-1.6.x/hardware/RBL/RBL_nRF51822/libraries/BLE_Examples/examples/BLE_SimplePeripheral/BLE_SimplePeripheral.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ GattCharacteristic *uartChars[] = {&characteristic1, &characteristic2, &characte
4242
//Create service
4343
GattService uartService(service1_uuid, uartChars, sizeof(uartChars) / sizeof(GattCharacteristic *));
4444

45+
DFUService *dfuService;
4546
HeartRateService *hrService;
4647
DeviceInformationService *deviceInfo;
4748
// Init HRM to 100bps
@@ -243,6 +244,7 @@ void setup() {
243244
// ADV_NON_CONNECTABLE_UNDIRECTED
244245
ble.setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);
245246
// add service
247+
dfuService = new DFUService(ble);
246248
hrService = new HeartRateService(ble, hrmCounter, HeartRateService::LOCATION_FINGER);
247249
deviceInfo = new DeviceInformationService(ble, "ARM", "Model1", "SN1", "hw-rev1", "fw-rev1", "soft-rev1");
248250
ble.addService(uartService);

0 commit comments

Comments
 (0)
0