test
Dependencies: BLE_API nRF51822 mbed
Fork of KS7 by
Diff: main.cpp
- Branch:
- KS3
- Revision:
- 23:ca1806081f0c
- Parent:
- 21:ab5b55d1947d
- Child:
- 24:c6ef55535900
--- a/main.cpp Tue Mar 22 08:55:40 2016 +0000 +++ b/main.cpp Tue Mar 22 09:22:51 2016 +0000 @@ -1,6 +1,7 @@ #include "mbed.h" #include "io.h" #include "BLE.h" +#include "DFUService.h" #include "common.h" #include <stdlib.h> @@ -16,7 +17,7 @@ #define MANUFACTURER_NAME_STRING "Hacarus" // Manufacturer Name String - shall represent the name of the manufacturer of the device. #define MODEL_NUMBER_STRING "0001" // Model Number String - shall represent the model number that is assigned by the device vendor. #define SERIAL_NUMBER_STRING "000780c0ffeef00d" // Serial Number String - shall represent the serial number for a particular instance of the device. -#define FIRMWARE_REVISION_STRING "v1.00.008@rev0018" // Firmware Revision String - shall represent the firmware revision for the firmware within the device. +#define FIRMWARE_REVISION_STRING "v1.00.009@rev0023" // Firmware Revision String - shall represent the firmware revision for the firmware within the device. // Weight Scale Service (Original) #define UUID_WEIGHT_SCALE_SERVICE (0x181D) @@ -215,6 +216,7 @@ ble.addService(HWS); ble.addService(DIS); + DFUService dfu(ble); } int main() @@ -243,18 +245,18 @@ BleInitialize(); AppInit(); - led_mode = MODE_OFF; for (;; ) { pc.printf("#"); // 100msec waitForEvent t.reset(); while(t.read_ms() < LED_INTERVAL_MSEC) { - pc.printf("."); + pc.printf("."); t.start(); ble.waitForEvent(); t.stop(); } + pc.printf("$"); pc.printf("%d %d\r\n", led_mode, io.get_switch()); // ticker蜃ヲ逅・