cts_c.h
Go to the documentation of this file.
1 /**
2  *****************************************************************************************
3  *
4  * @file cts_c.h
5  *
6  * @brief Current Time Service Client API
7  *
8  *****************************************************************************************
9  * @attention
10  #####Copyright (c) 2019 GOODIX
11  All rights reserved.
12 
13  Redistribution and use in source and binary forms, with or without
14  modification, are permitted provided that the following conditions are met:
15  * Redistributions of source code must retain the above copyright
16  notice, this list of conditions and the following disclaimer.
17  * Redistributions in binary form must reproduce the above copyright
18  notice, this list of conditions and the following disclaimer in the
19  documentation and/or other materials provided with the distribution.
20  * Neither the name of GOODIX nor the names of its contributors may be used
21  to endorse or promote products derived from this software without
22  specific prior written permission.
23 
24  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  POSSIBILITY OF SUCH DAMAGE.
35  *****************************************************************************************
36  */
37 
38 /**
39  * @addtogroup BLE_SRV BLE Services
40  * @{
41  */
42 
43 /**
44  * @defgroup BLE_SDK_CTS_C Current Time Service Client (CTS_C)
45  * @{
46  * @brief Current Time Service Client module.
47  *
48  * @details The Current Time Service Client contains the APIs and types, which can be used
49  * by the application to discover Current Time Service of peer and interact with it.
50  *
51  * The application must provide an event handler to be register, then call \ref cts_client_init().
52  * After Current Time Service Client discovers peer Current Time Service, application can
53  * receive current time value notification from peer, and also call \ref cts_c_cur_time_read()
54  * to get current time from peer. This module provides functions: \ref cts_c_loc_time_info_read()
55  * and \ref cts_c_ref_time_info_read() to read local time information and reference time informarion
56  * on peer.
57  */
58 
59 #ifndef __CTS_C_H__
60 #define __CTS_C_H__
61 
62 #include "gr_includes.h"
63 #include "custom_config.h"
64 #include "ble_prf_utils.h"
65 #include <stdint.h>
66 #include <stdbool.h>
67 
68 /**
69  * @defgroup CTS_C_MACRO Defines
70  * @{
71  */
72 #define CTS_C_CONNECTION_MAX 10 /**< Maximum number of HRS Client connections. */
73 #define CTS_C_CUR_TIME_VAL_LEN 10 /**< Length of current time value. */
74 #define CTS_C_LOC_TIME_INFO_VAL_LEN 2 /**< Length of local time information value. */
75 #define CTS_C_TIME_Y_M_D_UNKNOWN 0 /**< Year or Month or Day is not known. */
76 #define CTS_C_TIME_YEAR_VALID_VAL_MIN 1582 /**< Minimum value of valid year. */
77 #define CTS_C_TIME_YEAR_VALID_VAL_MAX 9999 /**< Maximum value of valid year. */
78 #define CTS_C_TIME_ZONE_OFFSET_MIN -48 /**< Minimum Value of Offset from UTC. */
79 #define CTS_C_TIME_ZONE_OFFSET_MAX 56 /**< Maximum Value of Offset from UTC. */
80 #define CTS_C_TIME_ACCURACY_OUT_RANGE 254 /**< Accuracy out of range. */
81 #define CTS_C_TIME_ACCURACT_UNKNOWN 255 /**< Accuracy Unknown. */
82 #define CTS_C_ERROR_FIELDS_IGNORED 0x80 /**< The server ignored one or more fields. */
83 
84 /**
85  * @defgroup CTS_C_ADJ_REASON Current Time Adjust Reason
86  * @{
87  * @brief Current Time Service Adjust Reason.
88  */
89 #define CTS_C_AR_NO_CHANGE (0x00 << 0) /**< No change for current time. */
90 #define CTS_C_AR_MAUAL_TIME_UPDATE (0x01 << 0) /**< Manual time update. */
91 #define CTS_C_AR_EXT_REF_TIME_UPDATE (0x01 << 1) /**< External reference time update. */
92 #define CTS_C_AR_TIME_ZONE_CHANGE (0x01 << 2) /**< Change of time zone. */
93 #define CTS_C_AR_DST_CHANGE (0x01 << 3) /**< Change of DST (daylight savings time). */
94 /** @} */
95 /** @} */
96 
97 /**
98  * @defgroup CTS_C_ENUM Enumerations
99  * @{
100  */
101 /**@brief Current Time Day of week. */
102 typedef enum
103 {
104  CTS_C_WEEK_UNKNOWN_DAY, /**< Day of week is not known. */
105  CTS_C_WEEK_MONDAY, /**< Monday. */
106  CTS_C_WEEK_TUSEDAY, /**< Tuesday. */
107  CTS_C_WEEK_WEDNESDAY, /**< Wednesday. */
108  CTS_C_WEEK_THURSDAT, /**< Thursday. */
109  CTS_C_WEEK_FRIDAY, /**< Friday. */
110  CTS_C_WEEK_SATURDAY, /**< Saturday. */
111  CTS_C_WEEK_SUNDAY /**< Sunday. */
113 
114 /**@brief Local time information:Daylight Saving Time Offset. */
115 typedef enum
116 {
117  CTS_C_DST_OFFSET_STANDAR_TIME = 0x00, /**< Standard Time. */
118  CTS_C_DST_OFFSET_HALF_HOUR = 0x02, /**< Half An Hour Daylight Time (+0.5h). */
119  CTS_C_DST_OFFSET_DAYLIGHT_TIME = 0x04, /**< Daylight Time (+1h). */
120  CTS_C_DST_OFFSET_DOUB_DAYLIGHT_TIME = 0x08, /**< Double Daylight Time (+2h). */
122 
123 /**@brief Reference time information:Time Source. */
124 typedef enum
125 {
126  CTS_C_REF_TIME_SRC_UNKNOWN, /**< Unknown. */
127  CTS_C_REF_TIME_SRC_NET_TIME_PROTOCOL, /**< Network Time Protocol. */
129  CTS_C_REF_TIME_SRC_RADIO_TIME_SIGNAL, /**< Radio Time Signal. */
130  CTS_C_REF_TIME_SRC_MANUAL, /**< Manual. */
131  CTS_C_REF_TIME_SRC_ATOMIC_CLOCK, /**< Atomic Clock. */
132  CTS_C_REF_TIME_SRC_CELLUAR_NET, /**< Cellular Network. */
134 
135 /**@brief Current Time Service Client event type. */
136 typedef enum
137 {
138  CTS_C_EVT_INVALID, /**< CTS Client invalid event. */
139  CTS_C_EVT_DISCOVERY_COMPLETE, /**< CTS Client has found CTS service and its characteristics. */
140  CTS_C_EVT_DISCOVERY_FAIL, /**< CTS Client found CTS service failed because of invalid operation or no found at the peer. */
141  CTS_C_EVT_CUR_TIME_NTF_SET_SUCCESS, /**< CTS Client has set Notification of Current Time characteristic. */
142  CTS_C_EVT_VALID_CUR_TIME_REC, /**< CTS Client has received valid Current Time value (Read or Notification from peer). */
143  CTS_C_EVT_INVALID_CUR_TIME_REC, /**< CTS Client has received invalid Current Time value (Read or Notification from peer). */
144  CTS_C_EVT_VALID_LOC_TIME_INFO_REC, /**< CTS Client has received valid Local Time Information value (Read from peer). */
145  CTS_C_EVT_INVALID_LOC_TIME_INFO_REC, /**< CTS Client has received invalid Local Time Information value (Read from peer). */
146  CTS_C_EVT_VALID_REF_TIME_INFO_REC, /**< CTS Client has received valid Reference Time Information Value (Read from peer). */
147  CTS_C_EVT_INVALID_REF_TIME_INFO_REC, /**< CTS Client has received invalid Reference Time Information Value (Read from peer). */
148  CTS_C_EVT_CUR_TIME_SET_SUCCESS, /**< CTS Client has writen Current Time completely. */
149  CTS_C_EVT_LOC_TIME_INFO_SET_SUCCESS, /**< CTS Client has writen Local Time Information completely. */
150  CTS_C_EVT_WRITE_OP_ERR, /**< Error occured when CTS Client writen to peer. */
152 /** @} */
153 
154 /**
155  * @defgroup CTS_C_STRUCT Structures
156  * @{
157  */
158 /**@brief Handles on the connected peer device needed to interact with it. */
159 typedef struct
160 {
161  uint16_t cts_srvc_start_handle; /**< CTS Service start handle. */
162  uint16_t cts_srvc_end_handle; /**< CTS Service end handle. */
163  uint16_t cts_cur_time_handle; /**< CTS Current Time characteristic Value handle which has been got from peer. */
164  uint16_t cts_cur_time_cccd_handle; /**< CTS CCCD handle of Current Time characteristic which has been got from peer. */
165  uint16_t cts_loc_time_info_handle; /**< CTS Local Time Information characteristic Value handle which has been got from peer. */
166  uint16_t cts_ref_time_info_handle; /**< CTS Reference Time Information characteristic Value handle which has been got from peer. */
168 
169 /**@brief Exact Time 256. */
170 typedef struct
171 {
172  prf_date_time_t date_time; /**< Date Time. */
173  uint8_t day_of_week; /**< Day of Week. */
174  uint8_t fractions_256; /**< 1/256th of a second. */
176 
177 /**@brief Current Time value. */
178 typedef struct
179 {
180  cts_c_exact_time_256_t day_date_time; /**< Exact Time 256. */
181  uint8_t adjust_reason; /**< Adjust Reason. */
183 
184 /**@brief Local Time Information. */
185 typedef struct
186 {
187  int8_t time_zone; /**< Time Zone, Offset from UTC in number of 15 minutes increments. */
188  cts_c_dst_offset_t dst_offset; /**< Daylight Saving Time Offset. */
190 
191 /**@brief Reference Time Information. */
192 typedef struct
193 {
194  cts_c_ref_time_source_t source; /**< Time Source. */
195  uint8_t accuracy; /**< Accuracy of time information. */
196  uint8_t days_since_update; /**< Days Since Update. */
197  uint8_t hours_since_update; /**< Hours Since Update. */
199 
200 /**@brief Current Time Service Client event. */
201 typedef struct
202 {
203  uint8_t conn_idx; /**< The index of the connection. */
204  cts_c_evt_type_t evt_type; /**< The CTS client event type. */
205  union
206  {
207  cts_c_cur_time_t cur_time; /**< Curren time received. */
208  cts_c_loc_time_info_t loc_time_info; /**< Local time information received. */
209  cts_c_ref_time_info_t ref_time_info; /**< Referen time information received. */
210  } value; /**< Decoded result of value received. */
211 } cts_c_evt_t;
212 /** @} */
213 
214 /**
215  * @defgroup CTS_C_TYPEDEF Typedefs
216  * @{
217  */
218 /**@brief Current Time Service Client event handler type. */
219 typedef void (*cts_c_evt_handler_t)(cts_c_evt_t *p_evt);
220 /** @} */
221 
222 /**
223  * @defgroup CTS_C_FUNCTION Functions
224  * @{
225  */
226 /**
227  *****************************************************************************************
228  * @brief Register CTS Client event handler.
229  *
230  * @param[in] evt_handler: Current Time Service Client event handler.
231  *
232  * @return Result of initialization.
233  *****************************************************************************************
234  */
236 
237 /**
238  *****************************************************************************************
239  * @brief Discovery Current Time Service on peer.
240  *
241  * @param[in] conn_idx: Index of connection.
242  *
243  * @return Operation result.
244  *****************************************************************************************
245  */
247 
248 /**
249  *****************************************************************************************
250  * @brief Enable or disable peer Current Time characteristic notify.
251  *
252  * @param[in] conn_idx: Index of connection.
253  * @param[in] is_enable: True or false.
254  *
255  * @return Operation result.
256  *****************************************************************************************
257  */
258 sdk_err_t cts_c_cur_time_notify_set(uint8_t conn_idx, bool is_enable);
259 
260 /**
261  *****************************************************************************************
262  * @brief Read Current Time characteristic value.
263  *
264  * @param[in] conn_idx: Index of connection.
265  *
266  * @return Operation result.
267  *****************************************************************************************
268  */
269 sdk_err_t cts_c_cur_time_read(uint8_t conn_idx);
270 
271 /**
272  *****************************************************************************************
273  * @brief Read Local Time Information characteristic value.
274  *
275  * @param[in] conn_idx: Index of connection.
276  *
277  * @return Operation result.
278  *****************************************************************************************
279  */
281 
282 /**
283  *****************************************************************************************
284  * @brief Read Reference Time Information characteristic value.
285  *
286  * @param[in] conn_idx: Index of connection.
287  *
288  * @return Operation result.
289  *****************************************************************************************
290  */
292 
293 /**
294  *****************************************************************************************
295  * @brief Set Current Time characteristic value.
296  *
297  * @param[in] conn_idx: Index of connection.
298  * @param[in] p_cur_time: Pointer to current time value set.
299  *
300  * @return Operation result.
301  *****************************************************************************************
302  */
303 sdk_err_t cts_c_cur_time_set(uint8_t conn_idx, cts_c_cur_time_t *p_cur_time);
304 
305 /**
306  *****************************************************************************************
307  * @brief Set Local Time Information characteristic value.
308  *
309  * @param[in] conn_idx: Index of connection.
310  * @param[in] p_loc_time_info: Pointer to local time information value set.
311  *
312  * @return Operation result.
313  *****************************************************************************************
314  */
315 sdk_err_t cts_c_loc_time_info_set(uint8_t conn_idx, cts_c_loc_time_info_t *p_loc_time_info);
316 
317 /**
318  *****************************************************************************************
319  * @brief Data accepts data and processing functions.
320  *
321  * @param[in] p_data: Serial port data.
322  * @param[in] length: Data length.
323  *****************************************************************************************
324  */
325 void cts_c_data_parse(uint8_t *p_data, uint16_t length);
326 /** @} */
327 
328 #endif
329 /** @} */
330 /** @} */
331 
CTS_C_REF_TIME_SRC_NET_TIME_PROTOCOL
@ CTS_C_REF_TIME_SRC_NET_TIME_PROTOCOL
Definition: cts_c.h:127
cts_c_loc_time_info_t
Local Time Information.
Definition: cts_c.h:186
cts_c_ref_time_info_t::hours_since_update
uint8_t hours_since_update
Definition: cts_c.h:197
CTS_C_WEEK_THURSDAT
@ CTS_C_WEEK_THURSDAT
Definition: cts_c.h:108
cts_c_handles_t::cts_cur_time_handle
uint16_t cts_cur_time_handle
Definition: cts_c.h:163
CTS_C_EVT_INVALID_CUR_TIME_REC
@ CTS_C_EVT_INVALID_CUR_TIME_REC
Definition: cts_c.h:143
CTS_C_EVT_CUR_TIME_SET_SUCCESS
@ CTS_C_EVT_CUR_TIME_SET_SUCCESS
Definition: cts_c.h:148
cts_c_ref_time_source_t
cts_c_ref_time_source_t
Reference time information:Time Source.
Definition: cts_c.h:125
CTS_C_WEEK_UNKNOWN_DAY
@ CTS_C_WEEK_UNKNOWN_DAY
Definition: cts_c.h:104
CTS_C_REF_TIME_SRC_UNKNOWN
@ CTS_C_REF_TIME_SRC_UNKNOWN
Definition: cts_c.h:126
cts_c_evt_t::cur_time
cts_c_cur_time_t cur_time
Definition: cts_c.h:207
CTS_C_EVT_VALID_REF_TIME_INFO_REC
@ CTS_C_EVT_VALID_REF_TIME_INFO_REC
Definition: cts_c.h:146
cts_c_ref_time_info_t::source
cts_c_ref_time_source_t source
Definition: cts_c.h:194
cts_c_cur_time_t::day_date_time
cts_c_exact_time_256_t day_date_time
Definition: cts_c.h:180
cts_c_loc_time_info_read
sdk_err_t cts_c_loc_time_info_read(uint8_t conn_idx)
Read Local Time Information characteristic value.
cts_c_exact_time_256_t::date_time
prf_date_time_t date_time
Definition: cts_c.h:172
cts_c_ref_time_info_t::accuracy
uint8_t accuracy
Definition: cts_c.h:195
CTS_C_EVT_INVALID_LOC_TIME_INFO_REC
@ CTS_C_EVT_INVALID_LOC_TIME_INFO_REC
Definition: cts_c.h:145
cts_c_exact_time_256_t
Exact Time 256.
Definition: cts_c.h:171
CTS_C_WEEK_WEDNESDAY
@ CTS_C_WEEK_WEDNESDAY
Definition: cts_c.h:107
CTS_C_DST_OFFSET_HALF_HOUR
@ CTS_C_DST_OFFSET_HALF_HOUR
Definition: cts_c.h:118
cts_c_loc_time_info_t::time_zone
int8_t time_zone
Definition: cts_c.h:187
gr_includes.h
Include Files API.
CTS_C_EVT_INVALID_REF_TIME_INFO_REC
@ CTS_C_EVT_INVALID_REF_TIME_INFO_REC
Definition: cts_c.h:147
CTS_C_EVT_INVALID
@ CTS_C_EVT_INVALID
Definition: cts_c.h:138
cts_c_handles_t::cts_cur_time_cccd_handle
uint16_t cts_cur_time_cccd_handle
Definition: cts_c.h:164
cts_c_handles_t::cts_ref_time_info_handle
uint16_t cts_ref_time_info_handle
Definition: cts_c.h:166
CTS_C_EVT_VALID_LOC_TIME_INFO_REC
@ CTS_C_EVT_VALID_LOC_TIME_INFO_REC
Definition: cts_c.h:144
CTS_C_REF_TIME_SRC_RADIO_TIME_SIGNAL
@ CTS_C_REF_TIME_SRC_RADIO_TIME_SIGNAL
Definition: cts_c.h:129
cts_c_handles_t
Handles on the connected peer device needed to interact with it.
Definition: cts_c.h:160
CTS_C_DST_OFFSET_DOUB_DAYLIGHT_TIME
@ CTS_C_DST_OFFSET_DOUB_DAYLIGHT_TIME
Definition: cts_c.h:120
cts_c_handles_t::cts_loc_time_info_handle
uint16_t cts_loc_time_info_handle
Definition: cts_c.h:165
cts_c_evt_t
Current Time Service Client event.
Definition: cts_c.h:202
cts_c_data_parse
void cts_c_data_parse(uint8_t *p_data, uint16_t length)
Data accepts data and processing functions.
cts_c_disc_srvc_start
sdk_err_t cts_c_disc_srvc_start(uint8_t conn_idx)
Discovery Current Time Service on peer.
CTS_C_EVT_CUR_TIME_NTF_SET_SUCCESS
@ CTS_C_EVT_CUR_TIME_NTF_SET_SUCCESS
Definition: cts_c.h:141
cts_c_cur_time_t::adjust_reason
uint8_t adjust_reason
Definition: cts_c.h:181
cts_c_dst_offset_t
cts_c_dst_offset_t
Local time information:Daylight Saving Time Offset.
Definition: cts_c.h:116
CTS_C_REF_TIME_SRC_MANUAL
@ CTS_C_REF_TIME_SRC_MANUAL
Definition: cts_c.h:130
cts_c_ref_time_info_t
Reference Time Information.
Definition: cts_c.h:193
cts_c_evt_t::loc_time_info
cts_c_loc_time_info_t loc_time_info
Definition: cts_c.h:208
cts_c_handles_t::cts_srvc_end_handle
uint16_t cts_srvc_end_handle
Definition: cts_c.h:162
cts_c_evt_t::ref_time_info
cts_c_ref_time_info_t ref_time_info
Definition: cts_c.h:209
cts_c_cur_time_set
sdk_err_t cts_c_cur_time_set(uint8_t conn_idx, cts_c_cur_time_t *p_cur_time)
Set Current Time characteristic value.
CTS_C_REF_TIME_SRC_ATOMIC_CLOCK
@ CTS_C_REF_TIME_SRC_ATOMIC_CLOCK
Definition: cts_c.h:131
cts_c_loc_time_info_set
sdk_err_t cts_c_loc_time_info_set(uint8_t conn_idx, cts_c_loc_time_info_t *p_loc_time_info)
Set Local Time Information characteristic value.
sdk_err_t
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:257
CTS_C_WEEK_MONDAY
@ CTS_C_WEEK_MONDAY
Definition: cts_c.h:105
prf_date_time_t
The date and time structure. The packed size is 7 bytes.
Definition: ble_prf_types.h:101
cts_client_init
sdk_err_t cts_client_init(cts_c_evt_handler_t evt_handler)
Register CTS Client event handler.
cts_c_ref_time_info_read
sdk_err_t cts_c_ref_time_info_read(uint8_t conn_idx)
Read Reference Time Information characteristic value.
CTS_C_DST_OFFSET_STANDAR_TIME
@ CTS_C_DST_OFFSET_STANDAR_TIME
Definition: cts_c.h:117
cts_c_exact_time_256_t::fractions_256
uint8_t fractions_256
Definition: cts_c.h:174
cts_c_evt_type_t
cts_c_evt_type_t
Current Time Service Client event type.
Definition: cts_c.h:137
cts_c_handles_t::cts_srvc_start_handle
uint16_t cts_srvc_start_handle
Definition: cts_c.h:161
cts_c_loc_time_info_t::dst_offset
cts_c_dst_offset_t dst_offset
Definition: cts_c.h:188
cts_c_cur_time_read
sdk_err_t cts_c_cur_time_read(uint8_t conn_idx)
Read Current Time characteristic value.
CTS_C_REF_TIME_SRC_GPS
@ CTS_C_REF_TIME_SRC_GPS
Definition: cts_c.h:128
CTS_C_WEEK_FRIDAY
@ CTS_C_WEEK_FRIDAY
Definition: cts_c.h:109
cts_c_exact_time_256_t::day_of_week
uint8_t day_of_week
Definition: cts_c.h:173
cts_c_evt_t::evt_type
cts_c_evt_type_t evt_type
Definition: cts_c.h:204
CTS_C_EVT_DISCOVERY_FAIL
@ CTS_C_EVT_DISCOVERY_FAIL
Definition: cts_c.h:140
CTS_C_EVT_LOC_TIME_INFO_SET_SUCCESS
@ CTS_C_EVT_LOC_TIME_INFO_SET_SUCCESS
Definition: cts_c.h:149
cts_c_cur_time_t
Current Time value.
Definition: cts_c.h:179
cts_c_evt_t::conn_idx
uint8_t conn_idx
Definition: cts_c.h:203
CTS_C_WEEK_TUSEDAY
@ CTS_C_WEEK_TUSEDAY
Definition: cts_c.h:106
cts_c_evt_handler_t
void(* cts_c_evt_handler_t)(cts_c_evt_t *p_evt)
Current Time Service Client event handler type.
Definition: cts_c.h:219
ble_prf_utils.h
Profile/Service Utilities API.
CTS_C_WEEK_SATURDAY
@ CTS_C_WEEK_SATURDAY
Definition: cts_c.h:110
cts_c_week_day_t
cts_c_week_day_t
Current Time Day of week.
Definition: cts_c.h:103
CTS_C_WEEK_SUNDAY
@ CTS_C_WEEK_SUNDAY
Definition: cts_c.h:111
CTS_C_DST_OFFSET_DAYLIGHT_TIME
@ CTS_C_DST_OFFSET_DAYLIGHT_TIME
Definition: cts_c.h:119
CTS_C_EVT_DISCOVERY_COMPLETE
@ CTS_C_EVT_DISCOVERY_COMPLETE
Definition: cts_c.h:139
CTS_C_EVT_WRITE_OP_ERR
@ CTS_C_EVT_WRITE_OP_ERR
Definition: cts_c.h:150
CTS_C_EVT_VALID_CUR_TIME_REC
@ CTS_C_EVT_VALID_CUR_TIME_REC
Definition: cts_c.h:142
CTS_C_REF_TIME_SRC_CELLUAR_NET
@ CTS_C_REF_TIME_SRC_CELLUAR_NET
Definition: cts_c.h:132
cts_c_cur_time_notify_set
sdk_err_t cts_c_cur_time_notify_set(uint8_t conn_idx, bool is_enable)
Enable or disable peer Current Time characteristic notify.
cts_c_ref_time_info_t::days_since_update
uint8_t days_since_update
Definition: cts_c.h:196