7#ifndef BT_FAST_PAIR_FMDN_H_
8#define BT_FAST_PAIR_FMDN_H_
10#include <zephyr/sys/slist.h>
11#include <zephyr/sys/util.h>
64#define BT_FAST_PAIR_FMDN_RING_COMP_BM_NONE (0x00)
71#define BT_FAST_PAIR_FMDN_RING_COMP_BM_ALL (0xFF)
89#define BT_FAST_PAIR_FMDN_RING_MSEC_PER_DSEC (100U)
97#define BT_FAST_PAIR_FMDN_RING_TIMEOUT_DS_TO_MS(_timeout_ds) \
98 ((_timeout_ds) * BT_FAST_PAIR_FMDN_RING_MSEC_PER_DSEC)
106#define BT_FAST_PAIR_FMDN_RING_TIMEOUT_MS_TO_DS(_timeout_ms) \
107 ((_timeout_ms) / BT_FAST_PAIR_FMDN_RING_MSEC_PER_DSEC)
366#define BT_FAST_PAIR_FMDN_BATTERY_LEVEL_NONE (0xFF)
409#define BT_FAST_PAIR_FMDN_ADV_PARAM_INIT(_int_min, _int_max) \
411 .interval_min = (_int_min), \
412 .interval_max = (_int_max), \
416#define BT_FAST_PAIR_FMDN_ADV_PARAM_DEFAULT \
417 ((struct bt_fast_pair_fmdn_adv_param[]) { \
418 BT_FAST_PAIR_FMDN_ADV_PARAM_INIT( \
bt_fast_pair_fmdn_ring_volume
Definition fmdn.h:74
@ BT_FAST_PAIR_FMDN_RING_VOLUME_LOW
Definition fmdn.h:79
@ BT_FAST_PAIR_FMDN_RING_VOLUME_DEFAULT
Definition fmdn.h:76
@ BT_FAST_PAIR_FMDN_RING_VOLUME_MEDIUM
Definition fmdn.h:82
@ BT_FAST_PAIR_FMDN_RING_VOLUME_HIGH
Definition fmdn.h:85
int bt_fast_pair_fmdn_read_mode_cb_register(const struct bt_fast_pair_fmdn_read_mode_cb *cb)
Register the read mode callbacks in the FMDN module.
bt_fast_pair_fmdn_ring_trigger
Definition fmdn.h:244
@ BT_FAST_PAIR_FMDN_RING_TRIGGER_GATT_STOPPED
Definition fmdn.h:258
@ BT_FAST_PAIR_FMDN_RING_TRIGGER_FAILED
Definition fmdn.h:249
@ BT_FAST_PAIR_FMDN_RING_TRIGGER_UI_STOPPED
Definition fmdn.h:255
@ BT_FAST_PAIR_FMDN_RING_TRIGGER_STARTED
Definition fmdn.h:246
@ BT_FAST_PAIR_FMDN_RING_TRIGGER_TIMEOUT_STOPPED
Definition fmdn.h:252
int bt_fast_pair_fmdn_ring_state_update(enum bt_fast_pair_fmdn_ring_src src, const struct bt_fast_pair_fmdn_ring_state_param *param)
Update the ringing state in the FMDN module.
bt_fast_pair_fmdn_ring_src
Ringing activity source types.
Definition fmdn.h:29
@ BT_FAST_PAIR_FMDN_RING_SRC_FMDN_BT_GATT
Definition fmdn.h:33
@ BT_FAST_PAIR_FMDN_RING_SRC_DULT_MOTION_DETECTOR
Definition fmdn.h:46
@ BT_FAST_PAIR_FMDN_RING_SRC_DULT_BT_GATT
Definition fmdn.h:39
int bt_fast_pair_fmdn_battery_level_set(uint8_t percentage_level)
Set the current battery level.
int bt_fast_pair_fmdn_motion_detector_cb_register(const struct bt_fast_pair_fmdn_motion_detector_cb *cb)
Register motion detector callbacks.
bt_fast_pair_fmdn_read_mode
Definition fmdn.h:539
@ BT_FAST_PAIR_FMDN_READ_MODE_DULT_ID
Definition fmdn.h:546
@ BT_FAST_PAIR_FMDN_READ_MODE_FMDN_RECOVERY
Definition fmdn.h:541
int bt_fast_pair_fmdn_read_mode_enter(enum bt_fast_pair_fmdn_read_mode mode)
Enter read mode.
int bt_fast_pair_fmdn_adv_param_set(const struct bt_fast_pair_fmdn_adv_param *adv_param)
Set the FMDN advertising parameters.
int bt_fast_pair_fmdn_info_cb_register(struct bt_fast_pair_fmdn_info_cb *cb)
Register the information callbacks in the FMDN module.
int bt_fast_pair_fmdn_ring_cb_register(const struct bt_fast_pair_fmdn_ring_cb *cb)
Register the ringing callbacks in the FMDN module.
bt_fast_pair_fmdn_ring_comp
Definition fmdn.h:50
@ BT_FAST_PAIR_FMDN_RING_COMP_RIGHT
Definition fmdn.h:52
@ BT_FAST_PAIR_FMDN_RING_COMP_LEFT
Definition fmdn.h:55
@ BT_FAST_PAIR_FMDN_RING_COMP_CASE
Definition fmdn.h:58
int bt_fast_pair_fmdn_id_set(uint8_t id)
Set the Bluetooth identity for the FMDN extension.
uint32_t interval_max
Definition fmdn.h:433
uint32_t interval_min
Definition fmdn.h:428
void(* provisioning_state_changed)(bool provisioned)
Indicate provisioning state changes.
Definition fmdn.h:519
sys_snode_t node
Definition fmdn.h:522
void(* clock_synced)(void)
Indicate that the peer was notified about the clock value.
Definition fmdn.h:499
bool(* period_expired)(void)
Notify the user that the motion detector period has expired.
Definition fmdn.h:334
void(* stop)(void)
Notify the user that the motion detector can be stopped.
Definition fmdn.h:343
void(* start)(void)
Request the user to start the motion detector.
Definition fmdn.h:319
Motion detector callback structure.
Definition fmdn.h:310
void(* exited)(enum bt_fast_pair_fmdn_read_mode mode)
Read mode exited.
Definition fmdn.h:558
void(* start_request)(enum bt_fast_pair_fmdn_ring_src src, const struct bt_fast_pair_fmdn_ring_req_param *param)
Request the user to start the ringing action.
Definition fmdn.h:165
void(* stop_request)(enum bt_fast_pair_fmdn_ring_src src)
Request the user to stop the ringing action on GATT request.
Definition fmdn.h:224
void(* timeout_expired)(enum bt_fast_pair_fmdn_ring_src src)
Request the user to stop the ringing action on timeout.
Definition fmdn.h:195
enum bt_fast_pair_fmdn_ring_volume volume
Definition fmdn.h:120
uint16_t timeout
Definition fmdn.h:117
uint8_t active_comp_bm
Definition fmdn.h:114
uint16_t timeout
Definition fmdn.h:275
uint8_t active_comp_bm
Definition fmdn.h:269
enum bt_fast_pair_fmdn_ring_trigger trigger
Definition fmdn.h:264