7#ifndef ZEPHYR_INCLUDE_BLUETOOTH_SERVICES_CTS_H_
8#define ZEPHYR_INCLUDE_BLUETOOTH_SERVICES_CTS_H_
int bt_cts_time_to_unix_ms(const struct bt_cts_time_format *ct_time, int64_t *unix_ms)
Helper API to decode CTS formatted time into milliseconds since epoch.
int bt_cts_send_notification(enum bt_cts_update_reason reason)
Notify all connected clients that have enabled the current time update notification.
int bt_cts_init(const struct bt_cts_cb *cb)
This API should be called at application init.
int bt_cts_time_from_unix_ms(struct bt_cts_time_format *ct_time, int64_t unix_ms)
Helper API to encode milliseconds since epoch to CTS formatted time.
bt_cts_update_reason
CTS time update reason bits as defined in the specification.
Definition cts.h:27
@ BT_CTS_UPDATE_REASON_TIME_ZONE_CHANGE
Definition cts.h:35
@ BT_CTS_UPDATE_REASON_EXTERNAL_REF
Definition cts.h:33
@ BT_CTS_UPDATE_REASON_DAYLIGHT_SAVING
Definition cts.h:37
@ BT_CTS_UPDATE_REASON_UNKNOWN
Definition cts.h:29
@ BT_CTS_UPDATE_REASON_MANUAL
Definition cts.h:31
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT64_TYPE__ int64_t
Definition stdint.h:75
Current Time Service callback structure.
Definition cts.h:57
int(* cts_time_write)(struct bt_cts_time_format *cts_time)
The Current Time has been updated by a peer.
Definition cts.h:74
void(* notification_changed)(bool enabled)
Current Time Service notifications changed.
Definition cts.h:62
int(* fill_current_cts_time)(struct bt_cts_time_format *cts_time)
When current time Read request or notification is triggered, CTS uses this callback to retrieve curre...
Definition cts.h:88