BLE Current Time Service
BLE Current Time Service (CTS) implementation.
supported only "Current Time" Characteristics.
https://developer.bluetooth.org/gatt/services/Pages/ServiceViewer.aspx
I don't have a device corresponding to the CTS, I cannot check it. x)
Diff: CurrentTimeService.h
- Revision:
- 3:eb07c3c4bf5e
- Parent:
- 2:27a6c04cadb2
- Child:
- 4:ad8739f7e30a
--- a/CurrentTimeService.h Sat Oct 17 17:06:23 2015 +0000 +++ b/CurrentTimeService.h Sat Oct 17 17:19:06 2015 +0000 @@ -36,13 +36,13 @@ BLE_DayofWeek dayOfWeek; } BLE_DayDateTime; -typedef struct BEL_ExactTime256 : BLE_DayDateTime { +typedef struct BLE_ExactTime256 : BLE_DayDateTime { uint8_t fractions256; -} BEL_ExactTime256; +} BLE_ExactTime256; -typedef struct BEL_CurrentTime : BEL_ExactTime256 { +typedef struct BLE_CurrentTime : BLE_ExactTime256 { uint8_t adjustReason; -} BEL_CurrentTime; +} BLE_CurrentTime; #define BLE_CURRENT_TIME_CHAR_VALUE_SIZE 10 @@ -173,7 +173,7 @@ // for debug infos. void printExactTime256Buffer() { - BEL_CurrentTime currentTime; + BLE_CurrentTime currentTime; currentTime.year = *((uint16_t *)&valueBytes[0]); currentTime.month = valueBytes[2]; currentTime.day = valueBytes[3];