BlueSync - BLE Time Sync for Zephyr
High-precision time synchronization for BLE Mesh networks
Loading...
Searching...
No Matches
bluesync.h File Reference
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/bluetooth.h>
Include dependency graph for bluesync.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bluesync_timestamps_t
 
struct  bluesync_param
 
struct  bluesync_msg
 Message structure used in BlueSync time synchronization exchanges. More...
 
struct  bluesync_msg_client
 Encapsulated BlueSync message received by the client during synchronization. More...
 

Macros

#define SLOT_NUMBER   CONFIG_BLUESYNC_SLOTS_IN_BURST
 
#define NB_BYTES_BITFIELD   (SLOT_NUMBER + 7) / 8
 
#define BLUESYNC_TIMESTAMP_ARRAY_SIZE   SLOT_NUMBER +1
 
#define BURST_WINDOWS_SIZE   CONFIG_BLUESYNC_BURST_WINDOWS_SIZE
 
#define MY_MANUFACTURER_ID   0x1234
 

Enumerations

enum  bluesync_status_t {
  BLUESYNC_SUCCESS_STATUS = 0 , BLUESYNC_NO_VALID_DATA_STATUS = -1 , BLUESYNC_NO_ENOUGH_DATA_STATUS = -2 , BLUESYNC_DENOMINATOR_TOO_SMALL = -3 ,
  BLUESYNC_TIMEOUT_STATUS = -4 , BLUESYNC_INVALID_PARAM_STATUS = -5 , BLUESYNC_BUSY_STATUS = -6 , BLUESYNC_BUF_WRONG_SIZE = -7
}
 

Variables

struct bluesync_msg __packed
 

Macro Definition Documentation

◆ BLUESYNC_TIMESTAMP_ARRAY_SIZE

#define BLUESYNC_TIMESTAMP_ARRAY_SIZE   SLOT_NUMBER +1

Definition at line 32 of file bluesync.h.

◆ BURST_WINDOWS_SIZE

#define BURST_WINDOWS_SIZE   CONFIG_BLUESYNC_BURST_WINDOWS_SIZE

Definition at line 34 of file bluesync.h.

◆ MY_MANUFACTURER_ID

#define MY_MANUFACTURER_ID   0x1234

Definition at line 36 of file bluesync.h.

◆ NB_BYTES_BITFIELD

#define NB_BYTES_BITFIELD   (SLOT_NUMBER + 7) / 8

Definition at line 31 of file bluesync.h.

◆ SLOT_NUMBER

#define SLOT_NUMBER   CONFIG_BLUESYNC_SLOTS_IN_BURST

Definition at line 30 of file bluesync.h.

Enumeration Type Documentation

◆ bluesync_status_t

Enumerator
BLUESYNC_SUCCESS_STATUS 
BLUESYNC_NO_VALID_DATA_STATUS 
BLUESYNC_NO_ENOUGH_DATA_STATUS 
BLUESYNC_DENOMINATOR_TOO_SMALL 
BLUESYNC_TIMEOUT_STATUS 
BLUESYNC_INVALID_PARAM_STATUS 
BLUESYNC_BUSY_STATUS 
BLUESYNC_BUF_WRONG_SIZE 

Definition at line 38 of file bluesync.h.

Variable Documentation

◆ __packed

struct bluesync_msg __packed