11#include <zephyr/types.h>
12#include <zephyr/bluetooth/conn.h>
13#include <zephyr/bluetooth/uuid.h>
14#include <zephyr/bluetooth/gatt.h>
27#define BT_UUID_DDFS_VAL \
28 BT_UUID_128_ENCODE(0x21490000, 0x494a, 0x4573, 0x98af, 0xf126af76f490)
31#define BT_UUID_DDFS_DISTANCE_MEAS_VAL \
32 BT_UUID_128_ENCODE(0x21490001, 0x494a, 0x4573, 0x98af, 0xf126af76f490)
35#define BT_UUID_DDFS_AZIMUTH_MEAS_VAL \
36 BT_UUID_128_ENCODE(0x21490002, 0x494a, 0x4573, 0x98af, 0xf126af76f490)
39#define BT_UUID_DDFS_ELEVATION_MEAS_VAL \
40 BT_UUID_128_ENCODE(0x21490003, 0x494a, 0x4573, 0x98af, 0xf126af76f490)
43#define BT_UUID_DDFS_FEATURE_VAL \
44 BT_UUID_128_ENCODE(0x21490004, 0x494a, 0x4573, 0x98af, 0xf126af76f490)
47#define BT_UUID_DDFS_CTRL_POINT_VAL \
48 BT_UUID_128_ENCODE(0x21490005, 0x494a, 0x4573, 0x98af, 0xf126af76f490)
50#define BT_UUID_DDFS BT_UUID_DECLARE_128(BT_UUID_DDFS_VAL)
51#define BT_UUID_DDFS_DISTANCE_MEAS BT_UUID_DECLARE_128(BT_UUID_DDFS_DISTANCE_MEAS_VAL)
52#define BT_UUID_DFFS_AZIMUTH_MEAS BT_UUID_DECLARE_128(BT_UUID_DDFS_AZIMUTH_MEAS_VAL)
53#define BT_UUID_DFFS_ELEVATION_MEAS BT_UUID_DECLARE_128(BT_UUID_DDFS_ELEVATION_MEAS_VAL)
54#define BT_UUID_DDFS_FEATURE BT_UUID_DECLARE_128(BT_UUID_DDFS_FEATURE_VAL)
55#define BT_UUID_DFFS_CTRL_POINT BT_UUID_DECLARE_128(BT_UUID_DDFS_CTRL_POINT_VAL)
166#ifdef CONFIG_DM_HIGH_PRECISION_CALC
168 uint16_t high_precision;
int bt_ddfs_distance_measurement_notify(struct bt_conn *conn, const struct bt_ddfs_distance_measurement *measurement)
Function for sending Distance Measurement value.
int bt_ddfs_azimuth_measurement_notify(struct bt_conn *conn, const struct bt_ddfs_azimuth_measurement *measurement)
Function for sending Azimuth Measurement value.
int bt_ddfs_init(const struct bt_ddfs_init_params *init)
Function for initializing the Direction and Distance Finding Service.
bt_ddfs_dm_ranging_mode
Definition: ddfs.h:58
@ BT_DDFS_DM_RANGING_MODE_RTT
Definition: ddfs.h:60
@ BT_DDFS_DM_RANGING_MODE_MCPD
Definition: ddfs.h:63
bt_ddfs_quality
Definition: ddfs.h:67
@ BT_DDFS_QUALITY_OK
Definition: ddfs.h:69
@ BT_DDFS_QUALITY_POOR
Definition: ddfs.h:72
@ BT_DDFS_QUALITY_NONE
Definition: ddfs.h:78
@ BT_DDFS_QUALITY_DO_NOT_USE
Definition: ddfs.h:75
int bt_ddfs_elevation_measurement_notify(struct bt_conn *conn, const struct bt_ddfs_elevation_measurement *measurement)
Function for sending Elevation Measurement value.
bt_addr_le_t bt_addr
Definition: ddfs.h:184
enum bt_ddfs_quality quality
Definition: ddfs.h:181
uint16_t value
Definition: ddfs.h:187
Structure of azimuth measurement results.
Definition: ddfs.h:179
int(* dm_config_read)(struct bt_ddfs_dm_config *config)
Indicates that the configuration for Distance Measurement is read.
Definition: ddfs.h:115
void(* am_notification_config_changed)(bool enabled)
Azimuth Measurement state callback.
Definition: ddfs.h:123
void(* dm_notification_config_changed)(bool enabled)
Distance Measurement state callback.
Definition: ddfs.h:131
int(* dm_ranging_mode_set)(uint8_t mode)
Indicates that the ranging mode for Distance Measurement is set.
Definition: ddfs.h:106
void(* em_notification_config_changed)(bool enabled)
Elevation Measurement state callback.
Definition: ddfs.h:139
Pointers to the callback functions for service events.
Definition: ddfs.h:98
uint16_t phase_slope
Definition: ddfs.h:158
uint16_t rtt
Definition: ddfs.h:173
uint16_t ifft
Definition: ddfs.h:155
bt_addr_le_t bt_addr
Definition: ddfs.h:148
struct bt_ddfs_distance_measurement::@170::_mcpd mcpd
union bt_ddfs_distance_measurement::@170 dist_estimates
uint16_t rssi_openspace
Definition: ddfs.h:161
enum bt_ddfs_quality quality
Definition: ddfs.h:145
enum bt_ddfs_dm_ranging_mode ranging_mode
Definition: ddfs.h:151
uint16_t best
Definition: ddfs.h:164
Structure of distance measurement results.
Definition: ddfs.h:143
enum bt_ddfs_dm_ranging_mode mode
Definition: ddfs.h:91
bool high_precision
Definition: ddfs.h:94
Distance Measurement configuration parameters.
Definition: ddfs.h:89
enum bt_ddfs_quality quality
Definition: ddfs.h:193
int8_t value
Definition: ddfs.h:199
bt_addr_le_t bt_addr
Definition: ddfs.h:196
Structure of elevation measurement results.
Definition: ddfs.h:191
uint8_t ranging_mode_rtt
Definition: ddfs.h:82
uint8_t ranging_mode_mcpd
Definition: ddfs.h:85
struct bt_ddfs_features dm_features
Definition: ddfs.h:205
const struct bt_ddfs_cb * cb
Definition: ddfs.h:208
Direction and Distance Finding Service initialization parameters.
Definition: ddfs.h:203