diff options
| author | JF002 <JF002@users.noreply.github.com> | 2020-10-04 10:21:22 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-04 10:21:22 (GMT) |
| commit | 39954bbd3afb592a0c3109e3479594183e8d0778 (patch) | |
| tree | 58efd04aa38b8dc7989c51fe3c9cdb9a3fb46a54 /src/Components/Ble/CurrentTimeService.h | |
| parent | 5adc97702c326d0252df6da75ce4ac244a4b3553 (diff) | |
| parent | 6c86d1d9d706706fcb6f214aba8259e61ed68755 (diff) | |
Merge pull request #68 from Avamander/patch-1
Rename folders to follow a consistent style
Diffstat (limited to 'src/Components/Ble/CurrentTimeService.h')
| -rw-r--r-- | src/Components/Ble/CurrentTimeService.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/Components/Ble/CurrentTimeService.h b/src/Components/Ble/CurrentTimeService.h deleted file mode 100644 index 58bc5ba..0000000 --- a/src/Components/Ble/CurrentTimeService.h +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once -#include <cstdint> -#include <array> -#include <Components/DateTime/DateTimeController.h> -#include <host/ble_gap.h> - -namespace Pinetime { - namespace Controllers { - class CurrentTimeService { - public: - CurrentTimeService(DateTime &dateTimeController); - void Init(); - - int OnTimeAccessed(uint16_t conn_handle, uint16_t attr_handle, - struct ble_gatt_access_ctxt *ctxt); - - private: - static constexpr uint16_t ctsId {0x1805}; - static constexpr uint16_t ctsCharId {0x2a2b}; - - static constexpr ble_uuid16_t ctsUuid { - .u { .type = BLE_UUID_TYPE_16 }, - .value = ctsId - }; - - static constexpr ble_uuid16_t ctChrUuid { - .u { .type = BLE_UUID_TYPE_16 }, - .value = ctsCharId - }; - - struct ble_gatt_chr_def characteristicDefinition[2]; - struct ble_gatt_svc_def serviceDefinition[2]; - - typedef struct __attribute__((packed)) { - uint16_t year; - uint8_t month; - uint8_t dayofmonth; - uint8_t hour; - uint8_t minute; - uint8_t second; - uint8_t millis; - uint8_t reason; - } CtsData; - - DateTime &m_dateTimeController; - }; - } -} |
