Go to the documentation of this file.
63 #include "custom_config.h"
70 #define DSS_SERVICE_UUID 0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80, \
71 0x0A, 0x46, 0x44, 0xD3, 0x01, 0x0A, 0xED, 0xA6
73 #define DSS_CONNECTION_MAX 10
74 #define DSS_ROLE_VALUE_LEN 1
75 #define DSS_EVT_CNT_VALUE_LEN 4
76 #define DSS_EVT_PERIOD_VALUE_LEN 2
77 #define DSS_STATUS_VALUE_LEN 1
78 #define DSS_CTRL_PT_VALUE_LEN 7
79 #define DSS_CTRL_PT_RSP_VAL_LEN 3
81 #define DSS_SYNC_DEV_MAX_NUM 5
82 #define DSS_CFG_ADV_IDX 0
83 #define DSS_SYNC_ADV_IDX 1
dss_rsp_id_t
Device Synchronize Service control point response IDs.
@ DSS_RSP_ID_SCAN_START_FAIL
Scan start fail.
void dss_set_sync_params(uint8_t conn_idx, bool is_auto_enter_lp, bool is_auto_calib_drift)
Set Sync params.
dss_role_t
Device Synchronize Service roles.
@ DSS_RSP_ID_ADV_TIMEOUT
Advertising start timeout.
@ DSS_EVT_SOURCE_ROLE_SET
Source Role set event.
@ DSS_OP_ID_CANCEL_SYNC
Cancel Synchronization op id.
@ DSS_ROLE_SYNC_SOURCE
Device synchronize source role (Create synchronize source and distribute).
@ DSS_RSP_ID_ROLE_ERR
Role error.
@ DSS_EVT_SYNC_SRC_CREATE
Sync source create event.
@ DSS_ROLE_SYNC_DEVICE
Device synchronize deivce role.
dss_evt_type_t evt_type
Event type.
sdk_err_t dss_sync_op_result_send(uint8_t conn_idx, dss_evt_type_t evt_type, dss_rsp_id_t rsp_id)
Send Control Point Response.
@ DSS_RSP_ID_DISALLOWED
Disallowed op.
@ DSS_RSP_ID_STATUS_ERR
Status error.
void(* dss_evt_handler_t)(dss_evt_t *p_evt)
Device Synchronize Service event handler type.
@ DSS_EVT_SYNC_CANCEL
Cancel Synchronization event.
bool is_enter_lp_mode
In Low Power Mode flag.
@ DSS_RSP_ID_ENTER_LP_FAIL
Enter Low Power Mode fail.
@ DSS_STATUS_IN_INITIATING
Device is in initiating.
@ DSS_EVT_SYNC_DESTROY
Destroy sync event.
@ DSS_OP_ID_SYNC_DESTROY
Destroy sync.
uint8_t conn_idx
Connect index.
dss_op_id_t
Device Synchronize Service control point OP IDs.
Device Synchronize Service Synchronize event.
@ DSS_RSP_ID_ADV_START_FAIL
Advertising start fail.
@ DSS_OP_ID_RSP
Response op id.
dss_staus_t
Device Synchronize Service status.
sdk_err_t dss_service_init(dss_evt_handler_t evt_handler)
Initialize a Device Synchronize Service instance and add in the database.
uint8_t sync_dev_num
Synchronize Device num.
@ DSS_RSP_ID_NO_HANDLER
No handler for op.
@ DSS_STATUS_IN_SCAN
Device is in scanning.
@ DSS_EVT_LP_ENTER
Enter low power event.
@ DSS_EVT_DEVICE_ROLE_SET
Device Role set event.
uint16_t sdk_err_t
SDK API result type.
@ DSS_OP_ID_ROLE_SET
Set role op id.
@ DSS_ROLE_SYNC_INVALID
Device synchronize invalid role.
void dss_set_lp_mode(uint8_t conn_idx, bool is_in_lp_mode)
Set Device whether in low power mode.
@ DSS_RSP_ID_PARAM_ERR
Parameter error.
@ DSS_RSP_ID_SCAN_TIMEOUT
Scan start timeout.
void dss_set_status(uint8_t conn_idx, dss_staus_t status)
Set dss status.
@ DSS_STATUS_IN_ADV
Device is in advertising.
@ DSS_RSP_ID_CONN_EST_FAIL
Connection establish fail.
@ DSS_OP_ID_SYNC_SRC_CREATE
Create synchronize source op id.
@ DSS_EVT_INVALID
Invalid event.
@ DSS_RSP_ID_CREATE_SRC_FAIL
Create source fail.
@ DSS_STATUS_CFG_READY
Device is ready for config,.
@ DSS_OP_ID_LP_ENTER
Enter low power mode(Stop all ble activity).
@ DSS_EVT_SYNC_SELF_OR_PEER
Synchronize self or peer event.
void dss_sync_src_distribute(uint8_t conn_idx)
Distribute sync source to peer.
@ DSS_EVT_SYNC_OCCUR
Sync occur event.
dss_evt_type_t
Device Synchronize Service event types.
@ DSS_OP_ID_SYNC
Synchronize self or peer op id.
@ DSS_RSP_ID_SUCCESS
Success.
@ DSS_RSP_ID_DESTROY_SRC_FAIL
Destroy source fail.
@ DSS_RSP_ID_DISTR_SRC_FAIL
Distribute source fail.
@ DSS_OP_ID_INVALID
Invalid op id.
@ DSS_RSP_ID_UNSUPPORT
Unsupport op.
uint32_t sync_cnt
Synchronize count.
@ DSS_RSP_ID_CANCEL_SYNC_FAIL
Cancel Synchronization fail.