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)

Revision:
4:ad8739f7e30a
Parent:
3:eb07c3c4bf5e
Child:
5:2d2370b78f0e
--- a/CurrentTimeService.h	Sat Oct 17 17:19:06 2015 +0000
+++ b/CurrentTimeService.h	Sat Oct 17 17:58:31 2015 +0000
@@ -144,7 +144,7 @@
      */
     void readDateTime(BLE_DateTime &dateTime)
     {
-        dateTime.year     = (uint16_t)valueBytes[0] << 8 | valueBytes[1];
+        dateTime.year     = *(uint16_t *)&valueBytes[0];
         dateTime.month    = valueBytes[2];
         dateTime.day      = valueBytes[3];
         dateTime.hours    = valueBytes[4];