24#ifndef TIME_SYNC_BLUESYNC_H_
25#define TIME_SYNC_BLUESYNC_H_
27#include <zephyr/kernel.h>
28#include <zephyr/bluetooth/bluetooth.h>
30#define SLOT_NUMBER CONFIG_BLUESYNC_SLOTS_IN_BURST
31#define NB_BYTES_BITFIELD (SLOT_NUMBER + 7) / 8
32#define BLUESYNC_TIMESTAMP_ARRAY_SIZE SLOT_NUMBER +1
34#define BURST_WINDOWS_SIZE CONFIG_BLUESYNC_BURST_WINDOWS_SIZE
36#define MY_MANUFACTURER_ID 0x1234
53#if defined(CONFIG_BLUESYNC_TEST_BABBLESIM_SUPPORT)
85 struct bt_le_ext_adv *
adv;
127#if defined(CONFIG_BLUESYNC_TEST_BABBLESIM_SUPPORT)
128 uint64_t master_estimation_ticks;
@ BLUESYNC_TIMEOUT_STATUS
@ BLUESYNC_INVALID_PARAM_STATUS
@ BLUESYNC_BUF_WRONG_SIZE
@ BLUESYNC_NO_ENOUGH_DATA_STATUS
@ BLUESYNC_NO_VALID_DATA_STATUS
@ BLUESYNC_SUCCESS_STATUS
@ BLUESYNC_DENOMINATOR_TOO_SMALL
#define BURST_WINDOWS_SIZE
struct bluesync_msg __packed
#define NB_BYTES_BITFIELD
Encapsulated BlueSync message received by the client during synchronization.
uint64_t client_timer_ticks
Message structure used in BlueSync time synchronization exchanges.
uint64_t master_timer_ticks
struct k_work end_sync_timeslot_worker
struct k_mutex local_history_mutex
bluesync_timestamps_t local
struct k_thread bluesync_thread
struct bt_le_scan_param scan_param
struct k_timer drift_estimation_timer
struct k_mutex rcv_history_mutex
bluesync_timestamps_t local_history[BURST_WINDOWS_SIZE]
struct bt_le_ext_adv * adv
struct k_work_delayable bluesync_adv_delayed_work
bluesync_timestamps_t rcv
struct k_mutex local_mutex
bluesync_timestamps_t rcv_history[BURST_WINDOWS_SIZE]
struct bt_le_adv_param adv_param