Mistake on this page? Email us
ll_api.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Link layer interface file.
6  *
7  * Copyright (c) 2013-2019 Arm Ltd. All Rights Reserved.
8  * Arm Ltd. confidential and proprietary.
9  *
10  * IMPORTANT. Your use of this file is governed by a Software License Agreement
11  * ("Agreement") that must be accepted in order to download or otherwise receive a
12  * copy of this file. You may not use or copy this file for any purpose other than
13  * as described in the Agreement. If you do not agree to all of the terms of the
14  * Agreement do not use this file and delete all copies in your possession or control;
15  * if you do not have a copy of the Agreement, you must contact Arm Ltd. prior
16  * to any use, copying or further distribution of this software.
17  */
18 /*************************************************************************************************/
19 
20 #ifndef LL_API_H
21 #define LL_API_H
22 
23 #include "wsf_types.h"
24 #include "wsf_os.h"
25 #include "util/bda.h"
26 #include "cfg_mac_ble.h"
27 #include "ll_defs.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 /*! \brief Version number. */
34 #define LL_VER_NUM 0x1302 /* Default value. Auto-generated by builder. */
35 
36 /**************************************************************************************************
37  Data Types
38 **************************************************************************************************/
39 
40 /*! \brief The following status values are used in the LL API. */
41 enum
42 {
43  LL_SUCCESS = 0x00,
44  LL_ERROR_CODE_UNKNOWN_HCI_CMD = 0x01,
45  LL_ERROR_CODE_UNKNOWN_CONN_ID = 0x02,
46  LL_ERROR_CODE_HW_FAILURE = 0x03,
47  LL_ERROR_CODE_PAGE_TIMEOUT = 0x04,
48  LL_ERROR_CODE_AUTH_FAILURE = 0x05,
49  LL_ERROR_CODE_PIN_KEY_MISSING = 0x06,
50  LL_ERROR_CODE_MEM_CAP_EXCEEDED = 0x07,
51  LL_ERROR_CODE_CONN_TIMEOUT = 0x08,
52  LL_ERROR_CODE_CONN_LIMIT_EXCEEDED = 0x09,
53  LL_ERROR_CODE_SYNCH_CONN_LIMIT_EXCEEDED = 0x0A,
54  LL_ERROR_CODE_ACL_CONN_ALREADY_EXISTS = 0x0B,
55  LL_ERROR_CODE_CMD_DISALLOWED = 0x0C,
56  LL_ERROR_CODE_CONN_REJ_LIMITED_RESOURCES = 0x0D,
57  LL_ERROR_CODE_CONN_REJECTED_SECURITY_REASONS = 0x0E,
58  LL_ERROR_CODE_CONN_REJECTED_UNACCEPTABLE_BDADDR = 0x0F,
59  LL_ERROR_CODE_CONN_ACCEPT_TIMEOUT_EXCEEDED = 0x10,
60  LL_ERROR_CODE_UNSUPPORTED_FEATURE_PARAM_VALUE = 0x11,
61  LL_ERROR_CODE_INVALID_HCI_CMD_PARAMS = 0x12,
62  LL_ERROR_CODE_REMOTE_USER_TERM_CONN = 0x13,
63  LL_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_LOW_RESOURCES = 0x14,
64  LL_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_POWER_OFF = 0x15,
65  LL_ERROR_CODE_CONN_TERM_BY_LOCAL_HOST = 0x16,
66  LL_ERROR_CODE_REPEATED_ATTEMPTS = 0x17,
67  LL_ERROR_CODE_PAIRING_NOT_ALLOWED = 0x18,
68  LL_ERROR_CODE_UNKNOWN_LMP_PDU = 0x19,
69  LL_ERROR_CODE_UNSUPPORTED_REMOTE_FEATURE = 0x1A,
70  LL_ERROR_CODE_SCO_OFFSET_REJ = 0x1B,
71  LL_ERROR_CODE_SCO_INTERVAL_REJ = 0x1C,
72  LL_ERROR_CODE_SCO_AIR_MODE_REJ = 0x1D,
73  LL_ERROR_CODE_INVALID_LMP_PARAMS = 0x1E,
74  LL_ERROR_CODE_UNSPECIFIED_ERROR = 0x1F,
75  LL_ERROR_CODE_UNSUPPORTED_LMP_PARAM_VAL = 0x20,
76  LL_ERROR_CODE_ROLE_CHANGE_NOT_ALLOWED = 0x21,
77  LL_ERROR_CODE_LMP_LL_RESP_TIMEOUT = 0x22,
78  LL_ERROR_CODE_LMP_ERR_TRANSACTION_COLLISION = 0x23,
79  LL_ERROR_CODE_LMP_PDU_NOT_ALLOWED = 0x24,
80  LL_ERROR_CODE_ENCRYPT_MODE_NOT_ACCEPTABLE = 0x25,
81  LL_ERROR_CODE_LINK_KEY_CAN_NOT_BE_CHANGED = 0x26,
82  LL_ERROR_CODE_REQ_QOS_NOT_SUPPORTED = 0x27,
83  LL_ERROR_CODE_INSTANT_PASSED = 0x28,
84  LL_ERROR_CODE_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED = 0x29,
85  LL_ERROR_CODE_DIFFERENT_TRANSACTION_COLLISION = 0x2A,
86  LL_ERROR_CODE_RESERVED1 = 0x2B,
87  LL_ERROR_CODE_QOS_UNACCEPTABLE_PARAM = 0x2C,
88  LL_ERROR_CODE_QOS_REJ = 0x2D,
89  LL_ERROR_CODE_CHAN_ASSESSMENT_NOT_SUPPORTED = 0x2E,
90  LL_ERROR_CODE_INSUFFICIENT_SECURITY = 0x2F,
91  LL_ERROR_CODE_PARAM_OUT_OF_MANDATORY_RANGE = 0x30,
92  LL_ERROR_CODE_RESERVED2 = 0x31,
93  LL_ERROR_CODE_ROLE_SWITCH_PENDING = 0x32,
94  LL_ERROR_CODE_RESERVED3 = 0x33,
95  LL_ERROR_CODE_RESERVED_SLOT_VIOLATION = 0x34,
96  LL_ERROR_CODE_ROLE_SWITCH_FAILED = 0x35,
97  LL_ERROR_CODE_EXTENDED_INQUIRY_RESP_TOO_LARGE = 0x36,
98  LL_ERROR_CODE_SIMPLE_PAIRING_NOT_SUPPORTED_BY_HOST = 0x37,
99  LL_ERROR_CODE_HOST_BUSY_PAIRING = 0x38,
100  LL_ERROR_CODE_CONN_REJ_NO_SUITABLE_CHAN_FOUND = 0x39,
101  LL_ERROR_CODE_CONTROLLER_BUSY = 0x3A,
102  LL_ERROR_CODE_UNACCEPTABLE_CONN_INTERVAL = 0x3B,
103  LL_ERROR_CODE_ADV_TIMEOUT = 0x3C,
104  LL_ERROR_CODE_CONN_TERM_MIC_FAILURE = 0x3D,
105  LL_ERROR_CODE_CONN_FAILED_TO_ESTABLISH = 0x3E,
106  LL_ERROR_CODE_MAC_CONN_FAILED = 0x3F,
107  LL_ERROR_CODE_COARSE_CLK_ADJ_REJ = 0x40,
108  LL_ERROR_CODE_TYPE0_SUBMAP_NOT_DEF = 0x41,
109  LL_ERROR_CODE_UNKNOWN_ADV_ID = 0x42,
110  LL_ERROR_CODE_LIMIT_REACHED = 0x43,
111  LL_ERROR_CODE_OP_CANCELLED_BY_HOST = 0x44,
112  LL_ERROR_CODE_PKT_TOO_LONG = 0x45
113 };
114 
115 /*! \addtogroup LL_API_INIT
116  * \{ */
117 
118 /*! \brief LL runtime configuration parameters. */
119 typedef struct
120 {
121  /* Device */
122  uint16_t compId; /*!< Company ID (default to ARM Ltd. ID). */
123  uint16_t implRev; /*!< Implementation revision number. */
124  uint8_t btVer; /*!< Core specification implementation level (LL_VER_BT_CORE_SPEC_4_2). */
125  uint32_t _align32; /*!< Unused. Align next field to word boundary. */
126  /* Advertiser */
127  uint8_t maxAdvSets; /*!< Maximum number of advertising sets. */
128  uint8_t maxAdvReports; /*!< Maximum number of pending legacy or extended advertising reports. */
129  uint16_t maxExtAdvDataLen; /*!< Maximum extended advertising data size. */
130  uint8_t defExtAdvDataFrag; /*!< Default extended advertising data fragmentation size. */
131  uint16_t auxDelayUsec; /*!< Auxiliary Offset delay above T_MAFS in microseconds. */
132  uint16_t auxPtrOffsetUsec; /*!< Delay of auxiliary packet in microseconds from the time specified by auxPtr. */
133  /* Scanner */
134  uint8_t maxScanReqRcvdEvt; /*!< Maximum scan request received events. */
135  uint16_t maxExtScanDataLen; /*!< Maximum extended scan data size. */
136  /* Connection */
137  uint8_t maxConn; /*!< Maximum number of connections. */
138  uint8_t numTxBufs; /*!< Default number of transmit buffers. */
139  uint8_t numRxBufs; /*!< Default number of receive buffers. */
140  uint16_t maxAclLen; /*!< Maximum ACL buffer size. */
141  int8_t defTxPwrLvl; /*!< Default Tx power level for connections. */
142  uint8_t ceJitterUsec; /*!< Allowable CE jitter on a slave (account for master's sleep clock resolution). */
143  /* ISO */
144  uint8_t numIsoTxBuf; /*!< Default number of ISO transmit buffers. */
145  uint8_t numIsoRxBuf; /*!< Default number of ISO receive buffers. */
146  uint16_t maxIsoBufLen; /*!< Maximum ISO buffer size between host and controller. */
147  uint16_t maxIsoPduLen; /*!< Maximum ISO PDU buffer size. */
148 
149  /* CIS */
150  uint8_t maxCig; /*!< Maximum number of CIG. */
151  uint8_t maxCis; /*!< Maximum number of CIS. */
152  uint16_t subEvtSpaceDelay; /*!< Subevent spacing above T_MSS. */
153  /* DTM */
154  uint16_t dtmRxSyncMs; /*!< DTM Rx synchronization window in milliseconds. */
155  /* PHY */
156  bool_t phy2mSup; /*!< 2M PHY supported. */
157  bool_t phyCodedSup; /*!< Coded PHY supported. */
158  bool_t stableModIdxTxSup; /*!< Tx stable modulation index supported. */
159  bool_t stableModIdxRxSup; /*!< Rx stable modulation index supported. */
160 } LlRtCfg_t;
161 
162 /*! \} */ /* LL_API_INIT */
163 
164 /*! \addtogroup LL_API_DEVICE
165  * \{ */
166 
167 /* The supported state bitmask indicates the LE states supported by the LL. */
168 #define LL_SUP_STATE_NON_CONN_ADV (UINT64_C(1) << 0) /*!< Non-connectable Advertising State supported. */
169 #define LL_SUP_STATE_SCAN_ADV (UINT64_C(1) << 1) /*!< Scannable Advertising State supported. */
170 #define LL_SUP_STATE_CONN_ADV (UINT64_C(1) << 2) /*!< Connectable Advertising State supported. */
171 #define LL_SUP_STATE_HI_DUTY_DIR_ADV (UINT64_C(1) << 3) /*!< High Duty Cycle Directed Advertising State supported. */
172 #define LL_SUP_STATE_PASS_SCAN (UINT64_C(1) << 4) /*!< Passive Scanning State supported. */
173 #define LL_SUP_STATE_ACT_SCAN (UINT64_C(1) << 5) /*!< Active Scanning State supported. */
174 #define LL_SUP_STATE_INIT (UINT64_C(1) << 6) /*!< Initiating State supported. Connection State in the Master Role supported is also supported. */
175 #define LL_SUP_STATE_CONN_SLV (UINT64_C(1) << 7) /*!< Connection State in the Slave Role supported. */
176 #define LL_SUP_STATE_NON_CONN_ADV_AND_PASS_SCAN (UINT64_C(1) << 8) /*!< Non-connectable Advertising State and Passive Scanning State combination supported. */
177 #define LL_SUP_STATE_SCAN_ADV_AND_PASS_SCAN (UINT64_C(1) << 9) /*!< Scannable Advertising State and Passive Scanning State combination supported. */
178 #define LL_SUP_STATE_CONN_ADV_AND_PASS_SCAN (UINT64_C(1) << 10) /*!< Connectable Advertising State and Passive Scanning State combination supported. */
179 #define LL_SUP_STATE_HI_DUTY_DIR_ADV_AND_PASS_SCAN (UINT64_C(1) << 11) /*!< Directed Advertising State and Passive Scanning State combination supported. */
180 #define LL_SUP_STATE_NON_CONN_ADV_AND_ACT_SCAN (UINT64_C(1) << 12) /*!< Non-connectable Advertising State and Active Scanning State combination supported. */
181 #define LL_SUP_STATE_SCAN_ADV_AND_ACT_SCAN (UINT64_C(1) << 13) /*!< Scannable Advertising State and Active Scanning State combination supported. */
182 #define LL_SUP_STATE_CONN_ADV_AND_ACT_SCAN (UINT64_C(1) << 14) /*!< Connectable Advertising State and Active Scanning State combination supported. */
183 #define LL_SUP_STATE_HI_DUTY_DIR_ADV_ACT_SCAN (UINT64_C(1) << 15) /*!< Directed Advertising State and Active Scanning State combination supported. */
184 #define LL_SUP_STATE_NON_CONN_ADV_AND_INIT (UINT64_C(1) << 16) /*!< Non-connectable Advertising State and Initiating State combination supported. */
185 #define LL_SUP_STATE_SCAN_ADV_AND_INIT (UINT64_C(1) << 17) /*!< Scannable Advertising State and Initiating State combination supported */
186 #define LL_SUP_STATE_NON_CONN_ADV_MST (UINT64_C(1) << 18) /*!< Non-connectable Advertising State and Master Role combination supported. */
187 #define LL_SUP_STATE_SCAN_ADV_MST (UINT64_C(1) << 19) /*!< Scannable Advertising State and Master Role combination supported. */
188 #define LL_SUP_STATE_NON_CONN_ADV_SLV (UINT64_C(1) << 20) /*!< Non-connectable Advertising State and Slave Role combination supported. */
189 #define LL_SUP_STATE_SCAN_ADV_SLV (UINT64_C(1) << 21) /*!< Scannable Advertising State and Slave Role combination supported. */
190 #define LL_SUP_STATE_PASS_SCAN_AND_INIT (UINT64_C(1) << 22) /*!< Passive Scanning State and Initiating State combination supported. */
191 #define LL_SUP_STATE_ACT_SCAN_AND_INIT (UINT64_C(1) << 23) /*!< Active Scanning State and Initiating State combination supported. */
192 #define LL_SUP_STATE_PASS_SCAN_MST (UINT64_C(1) << 24) /*!< Passive Scanning State and Master Role combination supported. */
193 #define LL_SUP_STATE_ACT_SCAN_MST (UINT64_C(1) << 25) /*!< Active Scanning State and Master Role combination supported. */
194 #define LL_SUP_STATE_PASS_SCAN_SLV (UINT64_C(1) << 26) /*!< Passive Scanning state and Slave Role combination supported. */
195 #define LL_SUP_STATE_ACT_SCAN_SLV (UINT64_C(1) << 27) /*!< Active Scanning state and Slave Role combination supported. */
196 #define LL_SUP_STATE_INIT_MST (UINT64_C(1) << 28) /*!< Initiating State and Master Role combination supported. Master Role and Master Role combination is also supported. */
197 #define LL_SUP_STATE_LO_DUTY_DIR_ADV (UINT64_C(1) << 29) /*!< Low Duty Cycle Directed Advertising State. */
198 #define LL_SUP_STATE_LO_DUTY_DIR_ADV_AND_PASS_SCAN (UINT64_C(1) << 30) /*!< Low Duty Cycle Directed Advertising and Passive Scanning State combination supported. */
199 #define LL_SUP_STATE_LO_DUTY_DIR_ADV_AND_ACT_SCAN (UINT64_C(1) << 31) /*!< Low Duty Cycle Directed Advertising and Active Scanning State combination supported. */
200 #define LL_SUP_STATE_CONN_ADV_AND_INIT (UINT64_C(1) << 32) /*!< Connectable Advertising State and Initiating State combination supported. */
201 #define LL_SUP_STATE_HI_DUTY_DIR_ADV_AND_INIT (UINT64_C(1) << 33) /*!< High Duty Cycle Directed Advertising and Initiating combination supported. */
202 #define LL_SUP_STATE_LO_DUTY_DIR_ADV_AND_INIT (UINT64_C(1) << 34) /*!< Low Duty Cycle Directed Advertising and Initiating combination supported. */
203 #define LL_SUP_STATE_CONN_ADV_MST (UINT64_C(1) << 35) /*!< Connectable Advertising State and Master Role combination supported. */
204 #define LL_SUP_STATE_HI_DUTY_DIR_ADV_MST (UINT64_C(1) << 36) /*!< High Duty Cycle Directed Advertising and Master Role combination supported. */
205 #define LL_SUP_STATE_LO_DUTY_DIR_ADV_MST (UINT64_C(1) << 37) /*!< Low Duty Cycle Directed Advertising and Master Role combination supported. */
206 #define LL_SUP_STATE_CONN_ADV_SLV (UINT64_C(1) << 38) /*!< Connectable Advertising State and Slave Role combination supported. */
207 #define LL_SUP_STATE_HI_DUTY_DIR_ADV_SLV (UINT64_C(1) << 39) /*!< High Duty Cycle Directed Advertising and Slave Role combination supported. */
208 #define LL_SUP_STATE_LO_DUTY_DIR_ADV_SLV (UINT64_C(1) << 40) /*!< Low Duty Cycle Directed Advertising and Slave Role combination supported. */
209 #define LL_SUP_STATE_INIT_SLV (UINT64_C(1) << 41) /*!< Initiating State and Slave Role combination. */
210 
211 /*! The features bitmask indicates the LE features supported by the LL. */
212 
213 /* --- Core Spec 4.0 --- */
214 #define LL_FEAT_ENCRYPTION (UINT64_C(1) << 0) /*!< Encryption supported. */
215 /* --- Core Spec 4.2 --- */
216 #define LL_FEAT_CONN_PARAM_REQ_PROC (UINT64_C(1) << 1) /*!< Connection Parameters Request Procedure supported. */
217 #define LL_FEAT_EXT_REJECT_IND (UINT64_C(1) << 2) /*!< Extended Reject Indication supported. */
218 #define LL_FEAT_SLV_INIT_FEAT_EXCH (UINT64_C(1) << 3) /*!< Slave-Initiated Features Exchange supported. */
219 #define LL_FEAT_LE_PING (UINT64_C(1) << 4) /*!< LE Ping supported. */
220 #define LL_FEAT_DATA_LEN_EXT (UINT64_C(1) << 5) /*!< Data Length Extension supported. */
221 #define LL_FEAT_PRIVACY (UINT64_C(1) << 6) /*!< LL Privacy supported. */
222 #define LL_FEAT_EXT_SCAN_FILT_POLICY (UINT64_C(1) << 7) /*!< Extended Scan Filter Policy supported. */
223 /* --- Core Spec 5.0 --- */
224 #define LL_FEAT_LE_2M_PHY (UINT64_C(1) << 8) /*!< LE 2M PHY supported. */
225 #define LL_FEAT_STABLE_MOD_IDX_TRANSMITTER (UINT64_C(1) << 9) /*!< Stable Modulation Index - Transmitter supported. */
226 #define LL_FEAT_STABLE_MOD_IDX_RECEIVER (UINT64_C(1) << 10) /*!< Stable Modulation Index - Receiver supported. */
227 #define LL_FEAT_LE_CODED_PHY (UINT64_C(1) << 11) /*!< LE Coded PHY supported. */
228 #define LL_FEAT_LE_EXT_ADV (UINT64_C(1) << 12) /*!< LE Extended Advertising supported. */
229 #define LL_FEAT_LE_PER_ADV (UINT64_C(1) << 13) /*!< LE Periodic Advertising supported. */
230 #define LL_FEAT_CH_SEL_2 (UINT64_C(1) << 14) /*!< Channel Selection Algorithm #2 supported. */
231 #define LL_FEAT_LE_POWER_CLASS_1 (UINT64_C(1) << 15) /*!< LE Power Class 1 supported. */
232 #define LL_FEAT_MIN_NUM_USED_CHAN (UINT64_C(1) << 16) /*!< Minimum Number of Used Channels supported. */
233 /* --- Core Spec 5.1 --- */
234 #define LL_FEAT_CONN_CTE_REQ (UINT64_C(1) << 17) /*!< Connection CTE Request supported */
235 #define LL_FEAT_CONN_CTE_RSP (UINT64_C(1) << 18) /*!< Connection CTE Response supported */
236 #define LL_FEAT_CONNLESS_CTE_TRANS (UINT64_C(1) << 19) /*!< Connectionless CTE Transmitter supported */
237 #define LL_FEAT_CONNLESS_CTE_RECV (UINT64_C(1) << 20) /*!< Connectionless CTE Receiver supported */
238 #define LL_FEAT_ANTENNA_SWITCH_AOD (UINT64_C(1) << 21) /*!< Anetenna Switching during CTE Transmission (AoD) supported */
239 #define LL_FEAT_ANTENNA_SWITCH_AOA (UINT64_C(1) << 22) /*!< Anetenna Switching during CTE Reception (AoA) supported */
240 #define LL_FEAT_RECV_CTE (UINT64_C(1) << 23) /*!< Receive Constant Tone Extension supported */
241 #define LL_FEAT_PAST_SENDER (UINT64_C(1) << 24) /*!< Periodic Advertising Sync Transfer – Sender supported. */
242 #define LL_FEAT_PAST_RECIPIENT (UINT64_C(1) << 25) /*!< Periodic Advertising Sync Transfer – Recipient supported. */
243 #define LL_FEAT_SCA_UPDATE (UINT64_C(1) << 26) /*!< Sleep Clock Accuracy Updates supported. */
244 #define LL_FEAT_REMOTE_PUB_KEY_VALIDATION (UINT64_C(1) << 27) /*!< Remote Public Key Validation supported. */
245 /* --- Core Spec Milan --- */
246 #define LL_FEAT_CIS_MASTER_ROLE (UINT64_C(1) << 28) /*!< Connected Isochronous Stream Master Role supported. */
247 #define LL_FEAT_CIS_SLAVE_ROLE (UINT64_C(1) << 29) /*!< Connected Isochronous Stream Slave Role supported. */
248 #define LL_FEAT_ISO_BROADCASTER (UINT64_C(1) << 30) /*!< Isochronous Broadcaster Role supported. */
249 #define LL_FEAT_ISO_SYNC (UINT64_C(1) << 31) /*!< Isochronous Synchronizer Role supported. */
250 
251 #define LL_FEAT_ALL_MASK (UINT64_C(0xFF01FFFF))/*!< All feature mask, need to be updated when new features are added. */
252 
253 /*! \brief This parameter identifies the device role. */
254 enum
255 {
256  LL_ROLE_MASTER = 0, /*!< Role is master. */
257  LL_ROLE_SLAVE = 1 /*!< Role is slave. */
258 };
259 
260 /*! \brief Operational mode flags. */
261 enum
262 {
263  LL_OP_MODE_FLAG_ENA_VER_LLCP_STARTUP = (1 << 0), /*!< Perform version exchange LLCP at connection establishment. */
264  LL_OP_MODE_FLAG_SLV_REQ_IMMED_ACK = (1 << 1), /*!< MD bit set if data transmitted. */
265  LL_OP_MODE_FLAG_BYPASS_CE_GUARD = (1 << 2), /*!< Bypass end of CE guard. */
266  LL_OP_MODE_FLAG_MST_RETX_AFTER_RX_NACK = (1 << 3), /*!< Master retransmits after receiving NACK. */
267  LL_OP_MODE_FLAG_MST_IGNORE_CP_RSP = (1 << 4), /*!< Master ignores LL_CONNECTION_PARAM_RSP. */
268  LL_OP_MODE_FLAG_MST_UNCOND_CP_RSP = (1 << 5), /*!< Master unconditionally accepts LL_CONNECTION_PARAM_RSP. */
269  /*!< (LL_OP_MODE_FLAG_MST_IGNORE_CP_RSP must be cleared). */
270  LL_OP_MODE_FLAG_ENA_LEN_LLCP_STARTUP = (1 << 6), /*!< Perform data length update LLCP at connection establishment. */
271  LL_OP_MODE_FLAG_REQ_SYM_PHY = (1 << 7), /*!< Require symmetric PHYs for connection. */
272  LL_OP_MODE_FLAG_ENA_FEAT_LLCP_STARTUP = (1 << 8), /*!< Perform feature exchange LLCP at connection establishment. */
273  LL_OP_MODE_FLAG_SLV_DELAY_LLCP_STARTUP = (1 << 9), /*!< Slave delays LLCP startup procedures. */
274  LL_OP_MODE_FLAG_ENA_SLV_LATENCY_WAKEUP = (1 << 10), /*!< Enable slave latency wake up upon data pending. */
275  LL_OP_MODE_FLAG_ENA_SLV_AUX_SCAN_RSP_ADI = (1 << 11), /*!< Enable ADI field for aux scan. */
276  LL_OP_MODE_FLAG_ENA_MST_CIS_NULL_PDU = (1 << 12), /*!< Enable CIS master sends additional NULL PDU for acknowledge scheme. */
277  LL_OP_MODE_FLAG_ENA_SLV_AUX_IND_ADVA = (1 << 13), /*!< AdvA will be included in AUX_ADV_IND instead of ADV_EXT_IND. */
278  LL_OP_MODE_FLAG_ENA_ADV_CHAN_RAND = (1 << 14), /*!< Enable advertising channel randomization. */
279  /* diagnostics only */
280  LL_OP_MODE_FLAG_ENA_ADV_DLY = (1 << 16), /*!< Enable advertising delay. */
281  LL_OP_MODE_FLAG_ENA_SCAN_BACKOFF = (1 << 17), /*!< Enable scan backoff. */
282  LL_OP_MODE_FLAG_ENA_WW = (1 << 18), /*!< Enable window widening. */
283  LL_OP_MODE_FLAG_ENA_SLV_LATENCY = (1 << 19), /*!< Enable slave latency. */
284  LL_OP_MODE_FLAG_ENA_LLCP_TIMER = (1 << 20), /*!< Enable LLCP timer. */
285  LL_OP_MODE_FLAG_IGNORE_CRC_ERR_TS = (1 << 21) /*!< Ignore timestamp of RX packet with CRC error. */
286 };
287 
288 /*! \} */ /* LL_API_DEVICE */
289 
290 /*! \addtogroup LL_API_BROADCAST
291  * \{ */
292 
293 /*! \brief The advertising type indicates the connectable and discoverable nature of the advertising packets transmitted by a device. */
294 enum
295 {
296  LL_ADV_CONN_UNDIRECT = 0, /*!< Connectable undirected advertising. Peer devices can scan and connect to this device. */
297  LL_ADV_CONN_DIRECT_HIGH_DUTY = 1, /*!< Connectable directed advertising, high duty cycle. Only a specified peer device can connect to this device. */
298  LL_ADV_SCAN_UNDIRECT = 2, /*!< Scannable undirected advertising. Peer devices can scan this device but cannot connect. */
299  LL_ADV_NONCONN_UNDIRECT = 3, /*!< Non-connectable undirected advertising. Peer devices cannot scan or connect to this device. */
300  LL_ADV_CONN_DIRECT_LOW_DUTY = 4 /*!< Connectable directed advertising, low duty cycle. Only a specified peer device can connect to this device. */
301 };
302 
303 /*! \brief The address type indicates whether an address is public or random. */
304 enum
305 {
306  LL_ADDR_PUBLIC = 0, /*!< Public address. */
307  LL_ADDR_RANDOM = 1, /*!< Random address. */
308  LL_ADDR_PUBLIC_IDENTITY = 2, /*!< Public identity address. */
309  LL_ADDR_RANDOM_IDENTITY = 3, /*!< Random (static) identity address. */
310  LL_ADDR_RANDOM_UNRESOLVABLE = 0xFE, /*!< Un-resolvable random address. */
311  LL_ADDR_ANONYMOUS = 0xFF /*!< Anonymous advertiser. */
312 };
313 
314 #define LL_ADDR_RANDOM_BIT LL_ADDR_RANDOM /*!< Address type random or public bit. */
315 #define LL_ADDR_IDENTITY_BIT LL_ADDR_PUBLIC_IDENTITY /*!< Address type identity bit. */
316 
317 /*! \brief Advertising channel bit. */
318 enum
319 {
320  LL_ADV_CHAN_37_BIT = (1 << 0), /*!< Advertising channel 37. */
321  LL_ADV_CHAN_38_BIT = (1 << 1), /*!< Advertising channel 38. */
322  LL_ADV_CHAN_39_BIT = (1 << 2), /*!< Advertising channel 39. */
323  LL_ADV_CHAN_ALL = 0x7, /*!< All advertising channels. */
324 };
325 
326 /*! \brief Advertising filter policy. */
327 enum
328 {
329  LL_ADV_FILTER_NONE = 0, /*!< Scan from any device. */
330  LL_ADV_FILTER_SCAN_WL_BIT = 1, /*!< Scan from White List only. */
331  LL_ADV_FILTER_CONN_WL_BIT = 2, /*!< Connect from While List only. */
332  LL_ADV_FILTER_WL_ONLY = 3 /*!< Scan and connect from While List only. */
333 };
334 
335 /*! \brief Advertising event properties. */
336 enum
337 {
338  LL_ADV_EVT_PROP_CONN_ADV_BIT = (1 << 0), /*!< Connectable advertising. */
339  LL_ADV_EVT_PROP_SCAN_ADV_BIT = (1 << 1), /*!< Scannable advertising. */
340  LL_ADV_EVT_PROP_DIRECT_ADV_BIT = (1 << 2), /*!< Directed advertising. */
341  LL_ADV_EVT_PROP_HIGH_DUTY_ADV_BIT = (1 << 3), /*!< High Duty Cycle advertising. */
342  LL_ADV_EVT_PROP_LEGACY_ADV_BIT = (1 << 4), /*!< Use legacy advertising PDUs. */
343  LL_ADV_EVT_PROP_OMIT_AA_BIT = (1 << 5), /*!< Omit advertiser's address from all PDUs (anonymous advertising). */
344  LL_ADV_EVT_PROP_TX_PWR_BIT = (1 << 6) /*!< Include TxPower in the advertising PDU. */
345 };
346 
347 #define LL_ADV_EVT_PROP_NON_CONN_NON_SCAN 0 /*!< Non-connectable and non-scannable advertising. */
348 
349 /*! \brief Extended advertising parameters. */
350 typedef struct
351 {
352  uint16_t advEventProp; /*!< Advertising Event Properties. */
353  uint32_t priAdvInterMin; /*!< Primary Advertising Interval Minimum. */
354  uint32_t priAdvInterMax; /*!< Primary Advertising Interval Maximum. */
355  uint8_t priAdvChanMap; /*!< Primary Advertising Channel Map. */
356  uint8_t ownAddrType; /*!< Own Address Type. */
357  uint8_t peerAddrType; /*!< Peer Address Type. */
358  uint8_t *pPeerAddr; /*!< Peer Address. */
359  uint8_t advFiltPolicy; /*!< Advertising Filter Policy. */
360  int8_t advTxPwr; /*!< Advertising Tx Power. */
361  uint8_t priAdvPhy; /*!< Primary Advertising PHY. */
362  uint8_t secAdvMaxSkip; /*!< Secondary Advertising Maximum Skip. */
363  uint8_t secAdvPhy; /*!< Secondary Advertising PHY. */
364  uint8_t advSID; /*!< Advertising SID. */
365  uint8_t scanReqNotifEna; /*!< Scan Request Notification Enable. */
367 
368 /*! \brief Extended advertising enable parameters. */
369 typedef struct
370 {
371  uint8_t handle; /*!< Advertising handle. */
372  uint16_t duration; /*!< Duration. */
373  uint8_t numEvents; /*!< Maximum number of extended advertising events. */
375 
376 /*! \brief Periodic advertising parameters. */
377 typedef struct
378 {
379  uint16_t perAdvInterMin; /*!< Periodic Advertising Interval Minimum. */
380  uint16_t perAdvInterMax; /*!< Periodic Advertising Interval Maximum. */
381  uint16_t perAdvProp; /*!< Periodic Advertising Properties. */
383 
384 /*! \brief Advertising data operation. */
385 enum
386 {
387  LL_ADV_DATA_OP_FRAG_INTER = 0, /*!< Intermediate fragment. */
388  LL_ADV_DATA_OP_FRAG_FIRST = 1, /*!< First fragment. */
389  LL_ADV_DATA_OP_FRAG_LAST = 2, /*!< Last fragment. */
390  LL_ADV_DATA_OP_COMP = 3, /*!< Complete extended advertising data. */
391  LL_ADV_DATA_OP_UNCHANGED = 4 /*!< Unchanged data (just update the Advertising DID). */
392 };
393 
394 /*! \brief Advertising data fragment preference. */
395 enum
396 {
397  LL_ADV_DATA_FRAG_ALLOW = 0, /*!< Controller may fragment all Host advertising data. */
398  LL_ADV_DATA_FRAG_DISALLOW = 1 /*!< Controller should not fragment nor minimize fragmentation of Host advertising data. */
399 };
400 
401 /*! \} */ /* LL_API_BROADCAST */
402 
403 /*! \addtogroup LL_API_OBSERVER
404  * \{ */
405 
406 /*! \brief Type of scan. */
407 enum
408 {
409  LL_SCAN_PASSIVE = 0, /*!< Passive scanning. */
410  LL_SCAN_ACTIVE = 1 /*!< Active scanning. */
411 };
412 
413 /*! \brief Init filter policy. */
414 enum
415 {
416  LL_INIT_FILTER_PEER = 0, /*!< Filter to only Peer addr and addr type. */
417  LL_INIT_FILTER_WL = 1, /*!< Filter to only whitelist. */
418  LL_INIT_FILTER_TOTAL /*!< Total number of filter policies. */
419 };
420 
421 /*! \brief Scan filter policy. */
422 enum
423 {
424  LL_SCAN_FILTER_NONE = 0, /*!< Accept all advertising packets. */
425  LL_SCAN_FILTER_WL_BIT = 1, /*!< Accept from While List only. */
426  LL_SCAN_FILTER_RES_INIT_BIT = 2, /*!< Accept directed advertisements with RPAs. */
427  LL_SCAN_FILTER_WL_OR_RES_INIT = 3 /*!< Accept from White List or directed advertisements with RPAs. */
428 };
429 
430 /*! \brief Periodic scan filter policy. */
431 enum
432 {
433  LL_PER_SCAN_FILTER_NONE = 0, /*!< Use advSID, advAddrType and advAddr to filter. */
434  LL_PER_SCAN_FILTER_PL_BIT = 1, /*!< Use the periodic advertiser list. */
435 };
436 
437 /*! \brief Scan parameters. */
438 typedef struct
439 {
440  uint16_t scanInterval; /*!< Scan interval. */
441  uint16_t scanWindow; /*!< Scan window. */
442  uint8_t scanType; /*!< Scan type. */
443  uint8_t ownAddrType; /*!< Address type used by this device. */
444  uint8_t scanFiltPolicy; /*!< Scan filter policy. */
445 } LlScanParam_t;
446 
447 /*! \brief Extended scan parameters. */
448 typedef struct
449 {
450  uint16_t scanInterval; /*!< Scan interval. */
451  uint16_t scanWindow; /*!< Scan window. */
452  uint8_t scanType; /*!< Scan type. */
454 
455 /*! \brief Scan filter modes for duplicate report. */
456 enum
457 {
458  LL_SCAN_FILTER_DUP_DISABLE = 0x00, /*!< Duplicate filtering disabled. */
459  LL_SCAN_FILTER_DUP_ENABLE_ONCE = 0x01, /*!< Duplicate filtering enabled. */
460  LL_SCAN_FILTER_DUP_ENABLE_PERIODIC = 0x02 /*!< Duplicate filtering enabled, reset for each scan period. */
461 };
462 
463 /*! \brief Advertising report event types. */
464 enum
465 {
466  LL_RPT_TYPE_ADV_IND = 0x00, /*!< Connectable undirected advertising (ADV_IND). */
467  LL_RPT_TYPE_ADV_DIRECT_IND = 0x01, /*!< Connectable directed advertising (ADV_DIRECT_IND). */
468  LL_RPT_TYPE_ADV_SCAN_IND = 0x02, /*!< Scannable undirected advertising (ADV_SCAN_IND). */
469  LL_RPT_TYPE_ADV_NONCONN_IND = 0x03, /*!< Non connectable undirected advertising (ADV_NONCONN_IND). */
470  LL_RPT_TYPE_SCAN_RSP = 0x04 /*!< Scan Response (SCAN_RSP). */
471 };
472 
473 /*! \brief Periodic advertising create sync options valid bits. */
474 #define LL_PER_ADV_CREATE_SYNC_OPTIONS_BITS 0x03
475 
476 /*! \brief Periodic advertising create sync command. */
477 typedef struct
478 {
479  uint8_t options; /*!< Options. */
480  uint8_t advSID; /*!< Advertising SID. */
481  uint8_t advAddrType; /*!< Advertiser Address Type. */
482  uint8_t *pAdvAddr; /*!< Advertiser Address. */
483  uint16_t skip; /*!< Skip. */
484  uint16_t syncTimeOut; /*!< Synchronization Timeout. */
486 
487 /*! \brief Device in periodic advertiser list */
488 typedef struct
489 {
490  uint8_t advAddrType; /*!< Advertiser Address Type. */
491  uint8_t *pAdvAddr; /*!< Advertiser Address. */
492  uint8_t advSID; /*!< Advertising SID. */
494 
495 /*! \} */ /* LL_API_OBSERVER */
496 
497 /*! \addtogroup LL_API_CONN
498  * \{ */
499 
500 /*! \brief Master clock accuracy. */
501 enum
502 {
503  LL_MCA_500_PPM = 0x00, /*!< 500 ppm */
504  LL_MCA_250_PPM = 0x01, /*!< 250 ppm */
505  LL_MCA_150_PPM = 0x02, /*!< 150 ppm */
506  LL_MCA_100_PPM = 0x03, /*!< 100 ppm */
507  LL_MCA_75_PPM = 0x04, /*!< 75 ppm */
508  LL_MCA_50_PPM = 0x05, /*!< 50 ppm */
509  LL_MCA_30_PPM = 0x06, /*!< 30 ppm */
510  LL_MCA_20_PPM = 0x07 /*!< 20 ppm */
511 };
512 
513 /*! \brief PHYS specification. */
514 enum
515 {
516  LL_PHYS_NONE = 0, /*!< No selected PHY. */
517  LL_PHYS_LE_1M_BIT = (1 << 0), /*!< LE 1M PHY. */
518  LL_PHYS_LE_2M_BIT = (1 << 1), /*!< LE 2M PHY. */
519  LL_PHYS_LE_CODED_BIT = (1 << 2), /*!< LE Coded PHY. */
520 };
521 
522 /*! \brief All PHYs preference. */
523 enum
524 {
525  LL_ALL_PHY_ALL_PREFERENCES = 0, /*!< All PHY preferences. */
526  LL_ALL_PHY_TX_PREFERENCE_BIT = (1 << 0), /*!< Set if no Tx PHY preference. */
527  LL_ALL_PHY_RX_PREFERENCE_BIT = (1 << 1) /*!< Set if no Rx PHY preference. */
528 };
529 
530 /*! \brief PHY options. */
531 enum
532 {
533  LL_PHY_OPTIONS_NONE = 0, /*!< No preferences. */
534  LL_PHY_OPTIONS_S2_PREFERRED = 1, /*!< S=2 coding preferred when transmitting on LE Coded PHY. */
535  LL_PHY_OPTIONS_S8_PREFERRED = 2, /*!< S=8 coding preferred when transmitting on LE Coded PHY. */
536 };
537 
538 /*! \brief PHY types. */
539 enum
540 {
541  LL_PHY_NONE = 0, /*!< PHY not selected. */
542  LL_PHY_LE_1M = 1, /*!< LE 1M PHY. */
543  LL_PHY_LE_2M = 2, /*!< LE 2M PHY. */
544  LL_PHY_LE_CODED = 3 /*!< LE Coded PHY. */
545 };
546 
547 /*! \brief Privacy modes. */
548 enum
549 {
550  LL_PRIV_MODE_NETWORK = 0, /*!< Network privacy mode. */
551  LL_PRIV_MODE_DEVICE = 1, /*!< Device privacy mode. */
552 };
553 
554 /*! \brief Initiating parameters (\a LlExtCreateConn()). */
555 typedef struct
556 {
557  uint16_t scanInterval; /*!< Scan interval. */
558  uint16_t scanWindow; /*!< Scan window. */
559  uint8_t filterPolicy; /*!< Scan filter policy. */
560  uint8_t ownAddrType; /*!< Address type used by this device. */
561  uint8_t peerAddrType; /*!< Address type used for peer device. */
562  const uint8_t *pPeerAddr; /*!< Address of peer device. */
563 } LlInitParam_t;
564 
565 /*! \brief Initiating parameters (\a LlExtCreateConn()). */
566 typedef struct
567 {
568  uint8_t filterPolicy; /*!< Scan filter policy. */
569  uint8_t ownAddrType; /*!< Address type used by this device. */
570  uint8_t peerAddrType; /*!< Address type used for peer device. */
571  const uint8_t *pPeerAddr; /*!< Address of peer device. */
572  uint8_t initPhys; /*!< Initiating PHYs. */
574 
575 /*! \brief Initiating scan parameters (\a LlExtCreateConn()). */
576 typedef struct
577 {
578  uint16_t scanInterval; /*!< Scan interval. */
579  uint16_t scanWindow; /*!< Scan window. */
581 
582 /*! \brief Connection specification (\a LlCreateConn(), \a LlConnUpdate() and \a LlExtCreateConn()). */
583 typedef struct
584 {
585  uint16_t connIntervalMin; /*!< Minimum connection interval. */
586  uint16_t connIntervalMax; /*!< Maximum connection interval. */
587  uint16_t connLatency; /*!< Connection latency. */
588  uint16_t supTimeout; /*!< Supervision timeout. */
589  uint16_t minCeLen; /*!< Minimum CE length. */
590  uint16_t maxCeLen; /*!< Maximum CE length. */
591 } LlConnSpec_t;
592 
593 /*! \brief Channel selection algorithm methods. */
594 enum
595 {
596  LL_CH_SEL_1 = 0, /*!< Channel selection #1. */
597  LL_CH_SEL_2 = 1 /*!< Channel selection #2. */
598 };
599 
600 /*! \brief Tx power level type. */
601 enum
602 {
603  LL_TX_PWR_LVL_TYPE_CURRENT = 0x00, /*!< Current transmit power level. */
604  LL_TX_PWR_LVL_TYPE_MAX = 0x01 /*!< Maximum transmit power level. */
605 };
606 
607 /*! \} */ /* LL_API_CONN */
608 
609 
610 /*! \addtogroup LL_API_ISO
611  * \{ */
612 
613 /*! \brief Packing scheme. */
614 enum
615 {
616  LL_PACKING_SEQUENTIAL = 0, /*!< Sequential. */
617  LL_PACKING_INTERLEAVED = 1 /*!< Interleaved. */
618 };
619 
620 /*! \brief Framing. */
621 enum
622 {
623  LL_FRAMING_UNFRAMED = 0, /*!< Unframed. */
624  LL_FRAMING_FRAMED = 1, /*!< Framed. */
625 };
626 
627 /*! \brief CIS parameters. */
628 typedef struct
629 {
630  uint8_t cisId; /*!< Used to identify a connected isochronous stream. */
631  uint16_t sduSizeMToS; /*!< Maximum size of a data SDU from the master to the slave. */
632  uint16_t sduSizeSToM; /*!< Maximum size of a data SDU from the slave to the master. */
633  uint8_t phyMToS; /*!< PHY to be used for transmission from master to slave. */
634  uint8_t phySToM; /*!< PHY to be used for transmission from master to slave. */
635  uint16_t transLatMToS; /*!< Maximum time in microseconds between the transmissions of a Data PDU from the Link Layer of the master to the reception of the same Data PDU in the Link Layer of the slave. */
636  uint16_t transLatSToM; /*!< Maximum time in microseconds between the transmissions of a Data PDU from the Link Layer of the slave to the reception of the same Data PDU in the Link Layer of the master. */
637  uint8_t rteMToS; /*!< Maximum number of times every PDU should be retransmitted from the master to slave. */
638  uint8_t rteSToM; /*!< Maximum number of times every PDU should be retransmitted from the slave to master. */
640 
641 /*! \brief CIG parameters. */
642 typedef struct
643 {
644  uint8_t cigId; /*!< Used to identify the connected isochronous group. */
645  uint32_t sduIntervalMToS; /*!< The time interval between the start of consecutive SDUs from the master Host */
646  uint32_t sduIntervalSToM; /*!< The time interval between the start of consecutive SDUs from the slave Host */
647  uint8_t sca; /*!< Sleep clock accuracy. */
648  uint8_t packing; /*!< Packing scheme. */
649  uint8_t framing; /*!< Indicates the format of CIS Data PDUs. */
650  uint8_t numCis; /*!< Number of CIS to set. */
651  LlCisCisParams_t *pCisParam; /*!< CIS parameters. */
653 
654 /*! \brief CIG test CIS parameters. */
655 typedef struct
656 {
657  uint8_t cisId; /*!< CIS identifier. */
658  uint8_t nse; /*!< Maximum number of subevent in each interval on CIS. */
659  uint8_t plSizeMToS; /*!< Maximum size of payload from master to slave. */
660  uint8_t plSizeSToM; /*!< Maximum size of payload from slave to master. */
661  uint8_t phyMToS; /*!< Master to slave PHY. */
662  uint8_t phySToM; /*!< Slave to master PHY. */
663  uint8_t ftMToS; /*!< Master to slave flush time. */
664  uint8_t ftSToM; /*!< Slave to master flush time. */
665  uint8_t bnMToS; /*!< Master to slave burst number. */
666  uint8_t bnSToM; /*!< Slave to master burst number. */
668 
669 /*! \brief CIG test CIG parameters. */
670 typedef struct
671 {
672  uint8_t cigId; /*!< CIG identifier. */
673  uint16_t isoInterval; /*!< The time duration of the isochronous PDU interval. */
674  uint8_t numCis; /*!< Number of CIS. */
675  uint8_t sca; /*!< Sleep clock accuracy. */
676  uint8_t packing; /*!< Packing scheme. */
677  LlCisCigCisParamsTest_t *pCisParam; /*!< CIS parameters. */
679 
680 /*! \brief CIS create CIS parameters. */
681 typedef struct
682 {
683  uint16_t *pCisHandle; /*!< Pointer to the connected isochronous stream handle array. */
684  uint16_t *pAclHandle; /*!< Pointer to the asynchronous connection link handle array. */
686 
687 /*! \brief CIS create CIS parameters. */
688 typedef struct
689 {
690  uint16_t isoHandle; /*!< Handle of CIS or BIS. */
691  uint32_t inputBw; /*!< Input bandwidth. */
692  uint32_t outputBw; /*!< Output bandwidth. */
693  uint8_t inputDataPath; /*!< Input data path. */
694  uint8_t outputDataPath; /*!< Output data path. */
695  uint8_t inputMaxPayloadSize; /*!< Input maximum payload size. */
696  uint8_t outputMaxPayloadSize; /*!< Output maximum payload size. */
698 
699 /*! \} */ /* LL_API_ISO */
700 
701 /*! \addtogroup LL_API_ENCRYPT
702  * \{ */
703 
704 /*! \brief Nonce mode. */
705 enum
706 {
707  LL_NONCE_MODE_PKT_CNTR = 0x00, /*!< Packet counter nonce mode (default). */
708  LL_NONCE_MODE_EVT_CNTR = 0x01 /*!< Connection event counter mode. */
709 };
710 
711 /*! \brief Encryption mode data structure used in LlGetEncMode() and LlSetEncMode(). */
712 typedef struct
713 {
714  bool_t enaAuth; /*!< Enable authentication. */
715  bool_t nonceMode; /*!< Nonce mode. */
716 } LlEncMode_t;
717 
718 /*! \} */ /* LL_API_ENCRYPT */
719 
720 /*! \addtogroup LL_API_TEST
721  * \{ */
722 
723 /*! \brief Test packet payload type. */
724 enum
725 {
726  LL_TEST_PKT_TYPE_PRBS9 = 0x00, /*!< Pseudo-Random bit sequence 9. */
727  LL_TEST_PKT_TYPE_0F = 0x01, /*!< 00001111'b packet payload type. */
728  LL_TEST_PKT_TYPE_55 = 0x02, /*!< 01010101'b packet payload type. */
729  LL_TEST_PKT_TYPE_PRBS15 = 0x03, /*!< Pseudo-Random bit sequence 15. */
730  LL_TEST_PKT_TYPE_FF = 0x04, /*!< 11111111'b packet payload type. */
731  LL_TEST_PKT_TYPE_00 = 0x05, /*!< 00000000'b packet payload type. */
732  LL_TEST_PKT_TYPE_F0 = 0x06, /*!< 11110000'b packet payload type. */
733  LL_TEST_PKT_TYPE_AA = 0x07 /*!< 10101010'b packet payload type. */
734 };
735 
736 /*! \brief Test PHY type. */
737 enum
738 {
739  LL_TEST_PHY_LE_1M = 0x01, /*!< LE 1M PHY. */
740  LL_TEST_PHY_LE_2M = 0x02, /*!< LE 2M PHY. */
741  LL_TEST_PHY_LE_CODED = 0x03, /*!< LE Coded PHY (data coding unspecified). */
742  LL_TEST_PHY_LE_CODED_S8 = 0x03, /*!< LE Coded PHY with S=8 data coding. */
743  LL_TEST_PHY_LE_CODED_S2 = 0x04 /*!< LE Coded PHY with S=2 data coding. */
744 };
745 
746 /*! \brief Test modulation index. */
747 enum
748 {
749  LL_TEST_MOD_IDX_STANDARD = 0x00, /*!< Standard modulation index. */
750  LL_TEST_MOD_IDX_STABLE = 0x01 /*!< Stable modulation index. */
751 };
752 
753 /*! \brief Test report data. */
754 typedef struct
755 {
756  uint16_t numTx; /*!< Total transmit packet count. */
757  uint16_t numRxSuccess; /*!< Successfully received packet count. */
758  uint16_t numRxCrcError; /*!< CRC failed packet count. */
759  uint16_t numRxTimeout; /*!< Receive timeout count. */
761 
762 /*! \} */ /* LL_API_TEST */
763 
764 /*! \addtogroup LL_API_EVENT
765  * \{ */
766 
767 /*! \brief Link control callback interface events */
768 enum
769 {
770  LL_ERROR_IND, /*!< Unrecoverable LL or radio error occurred (vendor specific). */
771  /* --- Core Spec 4.0 --- */
772  LL_RESET_CNF, /*!< Reset complete. */
773  LL_ADV_REPORT_IND, /*!< Advertising report. */
774  LL_ADV_ENABLE_CNF, /*!< Advertising enable/disable complete. */
775  LL_SCAN_ENABLE_CNF, /*!< Scan enable/disable complete. */
776  LL_CONN_IND, /*!< Connection complete. */
777  LL_DISCONNECT_IND, /*!< Disconnect complete. */
778  LL_CONN_UPDATE_IND, /*!< Connection update complete. */
779  LL_CREATE_CONN_CANCEL_CNF, /*!< Create connection cancel status. */
780  LL_READ_REMOTE_VER_INFO_CNF, /*!< Read remote version information complete. */
781  LL_READ_REMOTE_FEAT_CNF, /*!< Read remote features complete. */
782  LL_ENC_CHANGE_IND, /*!< Encryption change. */
783  LL_ENC_KEY_REFRESH_IND, /*!< Key refresh. */
784  LL_LTK_REQ_IND, /*!< LTK request. */
785  LL_LTK_REQ_NEG_REPLY_CNF, /*!< LTK request negative reply status. */
786  LL_LTK_REQ_REPLY_CNF, /*!< LTK request reply status. */
787  /* --- Core Spec 4.2 --- */
788  LL_REM_CONN_PARAM_IND, /*!< Remote connection parameter change. */
789  LL_AUTH_PAYLOAD_TIMEOUT_IND, /*!< Authentication payload timeout expired. */
790  LL_DATA_LEN_CHANGE_IND, /*!< Data length changed. */
791  LL_READ_LOCAL_P256_PUB_KEY_CMPL_IND, /*!< Read local P-256 public key complete. */
792  LL_GENERATE_DHKEY_CMPL_IND, /*!< Generate Diffie-Hellman key complete. */
793  LL_SCAN_REPORT_IND, /*!< Legacy scan report (vendor specific). */
794  /* --- Core Spec 5.0 --- */
795  LL_PHY_UPDATE_IND, /*!< LE PHY update complete. */
796  LL_EXT_ADV_REPORT_IND, /*!< Extended advertising report. */
797  LL_EXT_SCAN_ENABLE_CNF, /*!< Extended scan enable/disable complete. */
798  LL_SCAN_TIMEOUT_IND, /*!< Scan timeout. */
799  LL_SCAN_REQ_RCVD_IND, /*!< Scan request received. */
800  LL_EXT_ADV_ENABLE_CNF, /*!< Extended advertising enable/disable complete. */
801  LL_ADV_SET_TERM_IND, /*!< Advertising set terminated complete. */
802  LL_PER_ADV_ENABLE_CNF, /*!< Periodic advertising enable/disable complete. */
803  LL_PER_ADV_SYNC_ESTD_IND, /*!< Periodic scanning synchronization established. */
804  LL_PER_ADV_SYNC_LOST_IND, /*!< Periodic scanning synchronization lost. */
805  LL_PER_ADV_REPORT_IND, /*!< Periodic scanning report. */
806  LL_CH_SEL_ALGO_IND, /*!< Channel selection algorithm. */
807  /* --- Core Spec 5.1 --- */
808  LL_CONNLESS_IQ_REPORT_IND, /*!< LE connectionless IQ report received. */
809  LL_CONN_IQ_REPORT_IND, /*!< LE connection IQ report received. */
810  LL_CTE_REQ_FAILED_IND, /*!< LE CTE request failed received. */
811  LL_PER_SYNC_TRSF_RCVD_IND, /*!< LE periodic advertising sync transfer received. */
812  /* --- Core Spec Milan --- */
813  LL_CIS_EST_IND, /*!< CIS established event. */
814  LL_CIS_REQ_IND, /*!< CIS request event. */
815  LL_REQ_PEER_SCA_IND, /*!< Request peer SCA complete. */
816 };
817 
818 /*! \brief Advertising report indication */
819 typedef struct
820 {
821  wsfMsgHdr_t hdr; /*!< Event header. */
822  uint8_t *pData; /*!< Data buffer. */
823  uint8_t len; /*!< Data buffer length. */
824  int8_t rssi; /*!< RSSI. */
825  uint8_t eventType; /*!< Event type. */
826  uint8_t addrType; /*!< Address type. */
827  bdAddr_t addr; /*!< Address. */
828  /* --- direct fields --- */
829  uint8_t directAddrType; /*!< Direct address type. */
830  bdAddr_t directAddr; /*!< Direct address. */
832 
833 /*! \brief Connect indication */
834 typedef struct
835 {
836  wsfMsgHdr_t hdr; /*!< Event header. */
837  uint8_t status; /*!< Status. */
838  uint16_t handle; /*!< Connection handle. */
839  uint8_t role; /*!< Role of this device. */
840  uint8_t addrType; /*!< Address type. */
841  bdAddr_t peerAddr; /*!< Peer address. */
842  uint16_t connInterval; /*!< Connection interval. */
843  uint16_t connLatency; /*!< Connection latency. */
844  uint16_t supTimeout; /*!< Supervision timeout. */
845  uint8_t clockAccuracy; /*!< Clock accuracy. */
846  /* --- enhanced fields --- */
847  bdAddr_t localRpa; /*!< Local resolvable private address. */
848  bdAddr_t peerRpa; /*!< Peer resolvable private address. */
849 } LlConnInd_t;
850 
851 /*! \brief Disconnect indication */
852 typedef struct
853 {
854  wsfMsgHdr_t hdr; /*!< Event header. */
855  uint8_t status; /*!< Status. */
856  uint16_t handle; /*!< Connection handle. */
857  uint8_t reason; /*!< Reason code. */
859 
860 /*! \brief Connect update indication */
861 typedef struct
862 {
863  wsfMsgHdr_t hdr; /*!< Event header. */
864  uint8_t status; /*!< Status. */
865  uint16_t handle; /*!< Connection handle. */
866  uint16_t connInterval; /*!< Connection interval. */
867  uint16_t connLatency; /*!< Connection latency. */
868  uint16_t supTimeout; /*!< Supervision timeout. */
870 
871 /*! \brief Connection parameter change indication */
872 typedef struct
873 {
874  wsfMsgHdr_t hdr; /*!< Event header. */
875  uint16_t handle; /*!< Connection handle. */
876  uint16_t connIntervalMin;/*!< Minimum connection interval. */
877  uint16_t connIntervalMax;/*!< Maximum connection interval. */
878  uint16_t connLatency; /*!< Connection latency. */
879  uint16_t supTimeout; /*!< Supervision timeout. */
881 
882 /*! \brief Create connection cancel confirm */
883 typedef struct
884 {
885  wsfMsgHdr_t hdr; /*!< Event header. */
886  uint8_t status; /*!< Status. */
888 
889 /*! \brief Read remote version information confirm */
890 typedef struct
891 {
892  wsfMsgHdr_t hdr; /*!< Event header. */
893  uint8_t status; /*!< Status. */
894  uint16_t handle; /*!< Connection handle. */
895  uint8_t version; /*!< Bluetooth specification version. */
896  uint16_t mfrName; /*!< Manufacturer ID. */
897  uint16_t subversion; /*!< Subversion. */
899 
900 #define LL_FEAT_LEN 8 /*!< Length of features byte array */
901 
902 /*! \brief Read remote feature confirm */
903 typedef struct
904 {
905  wsfMsgHdr_t hdr; /*!< Event header. */
906  uint8_t status; /*!< Status. */
907  uint16_t handle; /*!< Connection handle. */
908  uint8_t features[LL_FEAT_LEN]; /*!< Features. */
910 
911 /*! \brief Encryption change indication */
912 typedef struct
913 {
914  wsfMsgHdr_t hdr; /*!< Event header. */
915  uint8_t status; /*!< Status. */
916  uint16_t handle; /*!< Connection handle. */
917  bool_t enabled; /*!< Encryption enabled. */
919 
920 /*! \brief Key refresh indication */
921 typedef struct
922 {
923  wsfMsgHdr_t hdr; /*!< Event header. */
924  uint8_t status; /*!< Status. */
925  uint16_t handle; /*!< Connection handle. */
927 
928 /*! \brief LTK request indication */
929 typedef struct
930 {
931  wsfMsgHdr_t hdr; /*!< Event header. */
932  uint16_t handle; /*!< Connection handle. */
933  uint8_t randNum[LL_RAND_LEN]; /*!< Random number. */
934  uint16_t encDiversifier; /*!< Encryption diversifier. */
935 } LlLtkReqInd_t;
936 
937 /*! \brief LTK request reply confirm */
938 typedef struct
939 {
940  wsfMsgHdr_t hdr; /*!< Event header. */
941  uint8_t status; /*!< Status. */
942  uint16_t handle; /*!< Connection handle. */
944 
945 /*! \brief LTK request negative reply */
946 typedef struct
947 {
948  wsfMsgHdr_t hdr; /*!< Event header. */
949  uint8_t status; /*!< Status. */
950  uint16_t handle; /*!< Connection handle. */
952 
953 /*! \brief Authentication payload timeout expired indication */
954 typedef struct
955 {
956  wsfMsgHdr_t hdr; /*!< Event header. */
957  uint16_t handle; /*!< Connection handle. */
959 
960 /*! \brief Data length change */
961 typedef struct
962 {
963  wsfMsgHdr_t hdr; /*!< Event header. */
964  uint16_t handle; /*!< Connection handle. */
965  uint16_t maxTxLen; /*!< Maximum transmit length. */
966  uint16_t maxTxTime; /*!< Maximum transmit time in microseconds. */
967  uint16_t maxRxLen; /*!< Maximum receive length. */
968  uint16_t maxRxTime; /*!< Maximum receive time in microseconds. */
970 
971 /*! \brief Read local P-256 key pair complete */
972 typedef struct
973 {
974  wsfMsgHdr_t hdr; /*!< Event header. */
975  uint8_t status; /*!< Status. */
976  uint8_t pubKey_x[LL_ECC_KEY_LEN]; /*!< Public key x-coordinate. */
977  uint8_t pubKey_y[LL_ECC_KEY_LEN]; /*!< Public key y-coordinate. */
979 
980 /*! \brief Generate Diffie-Hellman key complete */
981 typedef struct
982 {
983  wsfMsgHdr_t hdr; /*!< Event header. */
984  uint8_t status; /*!< Status. */
985  uint8_t dhKey[LL_ECC_KEY_LEN]; /*!< Diffie-Hellman key. */
987 
988 /*! \brief PHY update complete. */
989 typedef struct
990 {
991  wsfMsgHdr_t hdr; /*!< Event header. */
992  uint8_t status; /*!< Status. */
993  uint16_t handle; /*!< Connection handle. */
994  uint8_t txPhy; /*!< Transceiver PHY. */
995  uint8_t rxPhy; /*!< Receiver PHY. */
997 
998 /*! \brief HW error */
999 typedef struct
1000 {
1001  wsfMsgHdr_t hdr; /*!< Event header. */
1002  uint8_t code; /*!< Code. */
1003 } LlHwErrorInd_t;
1004 
1005 /*! \brief Scan report */
1006 typedef struct
1007 {
1008  wsfMsgHdr_t hdr; /*!< Event header. */
1009  uint8_t peerAddrType; /*!< Peer address type. */
1010  uint64_t peerAddr; /*!< Peer address. */
1011  uint64_t peerRpa; /*!< Peer RPA. */
1013 
1014 /*! \brief Extended advertising enable */
1015 typedef struct
1016 {
1017  wsfMsgHdr_t hdr; /*!< Event header. */
1018  uint8_t status; /*!< Status. */
1019  uint8_t handle; /*!< Advertising handle. */
1021 
1022 /*! \brief Periodic advertising enable */
1023 typedef struct
1024 {
1025  wsfMsgHdr_t hdr; /*!< Event header. */
1026  uint8_t status; /*!< Status. */
1027  uint8_t handle; /*!< Advertising handle. */
1029 
1030 /********************** CIS ******************************/
1031 /*! \brief CIS established event */
1032 typedef struct
1033 {
1034  wsfMsgHdr_t hdr; /*!< Event header. */
1035  uint8_t status; /*!< Status. */
1036  uint16_t cisHandle; /*!< CIS handle. */
1037  uint32_t cigSyncDelayUsec; /*!< CIG synchronization delay in usec. */
1038  uint32_t cisSyncDelayUsec; /*!< CIS synchronization delay in usec. */
1039  uint8_t phyMToS; /*!< Master to slave PHY. */
1040  uint8_t phySToM; /*!< Slave to master PHY. */
1041 } LlCisEstInd_t;
1042 
1043 /*! \brief CIS request event */
1044 typedef struct
1045 {
1046  wsfMsgHdr_t hdr; /*!< Event header. */
1047  uint16_t aclHandle; /*!< ACL handle. */
1048  uint16_t cisHandle; /*!< ACL handle. */
1049  uint8_t cigId; /*!< CIG identifier. */
1050  uint8_t cisId; /*!< CIS identifier. */
1051 } LlCisReqInd_t;
1052 
1053 /*! \brief Extended advertising report event types. */
1054 enum
1055 {
1056  LL_RPT_EVT_CONN_ADV_BIT = (1 << 0), /*!< Connectable advertising event bit. */
1057  LL_RPT_EVT_SCAN_ADV_BIT = (1 << 1), /*!< Scannable advertising event bit. */
1058  LL_RPT_EVT_DIRECT_ADV_BIT = (1 << 2), /*!< Directed advertising event bit. */
1059  LL_RPT_EVT_SCAN_RSP_BIT = (1 << 3), /*!< Scan response event bit. */
1060  LL_RPT_EVT_LEGACY_ADV_BIT = (1 << 4), /*!< Legacy advertising PDU event bit. */
1061 };
1062 
1063 /*! \brief Extended advertising report data status. */
1064 enum
1065 {
1066  LL_RPT_DATA_CMPL = 0x00, /*!< Data complete. */
1067  LL_RPT_DATA_INC_MORE = 0x01, /*!< Data incomplete, more date to come. */
1068  LL_RPT_DATA_INC_TRUNC = 0x02 /*!< Data incomplete, data truncated, no more date to come. */
1069 };
1070 
1071 /*! \brief Special SID values. */
1072 enum
1073 {
1074  LL_SID_NO_ADI = 0xFF /*!< No ADI field in the PDU. */
1075 };
1076 
1077 /*! \brief Extended advertising report */
1078 typedef struct
1079 {
1080  wsfMsgHdr_t hdr; /*!< Event header. */
1081  uint16_t eventType; /*!< Event type. */
1082  uint8_t addrType; /*!< Address type. */
1083  bdAddr_t addr; /*!< Address. */
1084  uint8_t priPhy; /*!< Primary PHY. */
1085  uint8_t secPhy; /*!< Secondary PHY. */
1086  uint8_t advSID; /*!< Advertising SID. */
1087  int8_t txPwr; /*!< Tx Power. */
1088  int8_t rssi; /*!< RSSI. */
1089  int16_t perAdvInter; /*!< Periodic advertising interval. */
1090  uint8_t directAddrType; /*!< Direct address type. */
1091  bdAddr_t directAddr; /*!< Direct address. */
1092  uint16_t len; /*!< Data buffer length. */
1093  const uint8_t *pData; /*!< Data buffer. */
1095 
1096 /*! \brief Extended scan enable confirm */
1097 typedef struct
1098 {
1099  wsfMsgHdr_t hdr; /*!< Event header. */
1100  uint8_t status; /*!< Status. */
1102 
1103 /*! \brief Advertising set terminated */
1104 typedef struct
1105 {
1106  wsfMsgHdr_t hdr; /*!< Event header. */
1107  uint8_t status; /*!< Status. */
1108  uint8_t advHandle; /*!< Advertising handle. */
1109  uint16_t connHandle; /*!< Connection handle. */
1110  uint8_t numCmplAdvEvt; /*!< Number of completed advertising events. */
1112 
1113 /*! \brief Scan request received */
1114 typedef struct
1115 {
1116  wsfMsgHdr_t hdr; /*!< Event header. */
1117  uint8_t handle; /*!< Advertising handle. */
1118  uint8_t scanAddrType; /*!< Scanner address type. */
1119  bdAddr_t scanAddr; /*!< Scanner address. */
1121 
1122 /*! \brief Used channel selection indication */
1123 typedef struct
1124 {
1125  wsfMsgHdr_t hdr; /*!< Event header. */
1126  uint16_t handle; /*!< Connection handle. */
1127  uint8_t usedChSel; /*!< Used channel selection. */
1128 } LlChSelInd_t;
1129 
1130 /*! \brief LE periodic advertising synchronization established */
1131 typedef struct
1132 {
1133  wsfMsgHdr_t hdr; /*!< Event header. */
1134  uint8_t status; /*!< Status. */
1135  uint16_t syncHandle; /*!< Sync handle. */
1136  uint8_t advSID; /*!< Advertising SID. */
1137  uint8_t addrType; /*!< Advertiser address type. */
1138  bdAddr_t addr; /*!< Advertiser address. */
1139  uint8_t advPhy; /*!< Advertiser PHY. */
1140  uint16_t perAdvInterval; /*!< Periodic advertising interval. */
1141  uint8_t advClkAccuracy; /*!< Advertiser clock accuracy. */
1143 
1144 /*! \brief LE periodic advertising report */
1145 typedef struct
1146 {
1147  wsfMsgHdr_t hdr; /*!< Event header. */
1148  uint16_t syncHandle; /*!< Sync handle. */
1149  int8_t txPwr; /*!< Tx Power. */
1150  int8_t rssi; /*!< RSSI. */
1151  uint8_t unused; /*!< Future use. */
1152  uint8_t dataStatus; /*!< Data status. */
1153  uint16_t len; /*!< Data buffer length. */
1154  const uint8_t *pData; /*!< Data buffer. */
1156 
1157 /*! \brief LE periodic advertising sync lost */
1158 typedef struct
1159 {
1160  wsfMsgHdr_t hdr; /*!< Event header. */
1161  uint16_t syncHandle; /*!< Sync handle. */
1163 
1164 /*! \brief LE periodic advertising sync transfer received */
1165 typedef struct
1166 {
1167  wsfMsgHdr_t hdr; /*!< Event header. */
1168  uint8_t status; /*!< Status. */
1169  uint16_t connHandle; /*!< Connection handle. */
1170  uint16_t serviceData; /*!< Service data. */
1171  uint16_t syncHandle; /*!< Sync handle. */
1172  uint8_t advSID; /*!< Advertising SID. */
1173  uint8_t addrType; /*!< Advertiser address type. */
1174  bdAddr_t addr; /*!< Advertiser address. */
1175  uint8_t advPhy; /*!< Advertiser PHY. */
1176  uint16_t perAdvInterval; /*!< Periodic advertising interval. */
1177  uint8_t advClkAccuracy; /*!< Advertiser clock accuracy. */
1179 
1180 /*! \brief LE request peer SCA complete */
1181 typedef struct
1182 {
1183  wsfMsgHdr_t hdr; /*!< Event header. */
1184  uint8_t status; /*!< Status. */
1185  uint16_t connHandle; /*!< Connection handle. */
1186  uint8_t peerSca; /*!< Peer SCA. */
1187 } LlPeerScaCnf_t;
1188 
1189 /*! \brief Union of all event types */
1190 typedef union
1191 {
1192  wsfMsgHdr_t hdr; /*!< Event header. */
1193  LlHwErrorInd_t hwErrorInd; /*!< Unrecoverable LL or radio error occurred. */
1194  /* --- Core Spec 4.0 --- */
1195  LlAdvReportInd_t advReportInd; /*!< LE advertising report. */
1196  LlConnInd_t connInd; /*!< LE connection complete. */
1197  LlDisconnectInd_t disconnectInd; /*!< LE disconnect complete. */
1198  LlConnUpdateInd_t connUpdateInd; /*!< LE connection update complete. */
1199  LlCreateConnCancelCnf_t createConnCancelCnf; /*!< LE create connection cancel status. */
1200  LlReadRemoteVerInfoCnf_t readRemoteVerInfoCnf; /*!< Read remote version information complete. */
1201  LlReadRemoteFeatCnf_t readRemoteFeatCnf; /*!< LE read remote features complete. */
1202  LlEncChangeInd_t encChangeInd; /*!< Encryption change. */
1203  LlEncKeyRefreshInd_t keyRefreshInd; /*!< Key refresh. */
1204  LlLtkReqInd_t ltkReqInd; /*!< LE LTK request. */
1205  LlLtkReqNegReplyCnf_t ltkReqNegReplyCnf; /*!< LTK request negative reply status. */
1206  LlLtkReqReplyCnf_t ltkReqReplyCnf; /*!< LTK request reply status. */
1207  /* --- Core Spec 4.2 --- */
1208  LlRemConnParamInd_t remConnParamInd; /*!< LE remote connection parameter request. */
1209  LlAuthPayloadTimeoutInd_t authPayloadTimeoutInd; /*!< Authentication payload timeout. */
1210  LlDataLenChangeInd_t dataLenChangeInd; /*!< Data length changed. */
1211  LlReadLocalP256PubKeyInd_t readLocalP256PubKeyInd; /*!< Read local P-256 public key complete. */
1212  LlGenerateDhKeyInd_t generateDhKeyInd; /*!< Generate Diffie-Hellman key complete. */
1213  LlScanReportInd_t scanReportInd; /*!< Scan report. */
1214  /* --- Core Spec 5.0 --- */
1215  LlPhyUpdateInd_t phyUpdateInd; /*!< PHY update complete. */
1216  LlExtAdvReportInd_t extAdvReportInd; /*!< LE extended advertising report. */
1217  LlExtScanEnableCnf_t extScanEnableCnf; /*!< LE extended scan enable completed. */
1218  LlScanReqRcvdInd_t scanReqRcvdInd; /*!< LE scan request received. */
1219  LlExtAdvEnableCnf_t extAdvEnableCnf; /*!< LE extended advertising enable complete. */
1220  LlAdvSetTermInd_t advSetTermInd; /*!< LE advertising set terminated. */
1221  LlChSelInd_t usedChSelInd; /*!< Used channel selection. */
1222  LlPerAdvEnableCnf_t perAdvEnableCnf; /*!< LE periodic advertising enable complete. */
1223  LlPerAdvSyncEstdCnf_t perAdvSyncEstdCnf; /*!< LE periodic advertising sync established. */
1224  LlPerAdvReportInd_t perAdvReportInd; /*!< LE periodic advertising report. */
1225  LlPerAdvSyncLostInd_t perAdvSyncLostInd; /*!< LE periodic advertising sync lost. */
1226  /* --- Core Spec 5.1 --- */
1227  LlPerSyncTrsfRcvdInd_t perASyncTrsfRcvdInd; /*!< LE periodic advertising sync transfer received. */
1228  /* --- Core Spec Milan --- */
1229  LlCisEstInd_t cisEst; /*!< LE CIS established. */
1230  LlCisReqInd_t cisReq; /*!< LE CIS request. */
1231  LlPeerScaCnf_t peerScaCnf; /*!< LE request peer SCA complete. */
1232 } LlEvt_t;
1233 
1234 /*! \brief Event callback */
1235 typedef bool_t (*llEvtCback_t)(LlEvt_t *pEvent);
1236 
1237 /*! \brief ACL callback */
1238 typedef void (*llAclCback_t)(uint16_t handle, uint8_t numBufs);
1239 
1240 /*! \brief ISO callback */
1241 typedef void (*llIsoCback_t)(uint16_t handle, uint8_t numBufs);
1242 
1243 /*! \} */ /* LL_API_EVENT */
1244 
1245 /**************************************************************************************************
1246  Function Declarations
1247 **************************************************************************************************/
1248 
1249 /*! \addtogroup LL_API_INIT
1250  * \{ */
1251 
1252 /*************************************************************************************************/
1253 /*!
1254  * \brief Get default runtime configuration values.
1255  *
1256  * \param pCfg Pointer to runtime configuration parameters.
1257  *
1258  * \return None.
1259  *
1260  * This function returns default value for the LL subsystem's runtime configurations.
1261  */
1262 /*************************************************************************************************/
1263 void LlGetDefaultRunTimeCfg(LlRtCfg_t *pCfg);
1264 
1265 /*************************************************************************************************/
1266 /*!
1267  * \brief Initialize runtime configuration.
1268  *
1269  * \param pCfg Pointer to runtime configuration parameters (data must be static).
1270  *
1271  * \return None.
1272  *
1273  * This function initializes the LL subsystem's runtime configuration.
1274  *
1275  * \note This routine must be called only once before any other initialization routines.
1276  */
1277 /*************************************************************************************************/
1278 void LlInitRunTimeCfg(const LlRtCfg_t *pCfg);
1279 
1280 /*************************************************************************************************/
1281 /*!
1282  * \brief Initialize memory for connections.
1283  *
1284  * \param pFreeMem Pointer to free memory.
1285  * \param freeMemSize Size of pFreeMem.
1286  *
1287  * \return Amount of free memory consumed.
1288  *
1289  * This function allocates memory for connections.
1290  *
1291  * \note This routine must be called after LlInitRunTimeCfg() but only once before any
1292  * other initialization routines.
1293  */
1294 /*************************************************************************************************/
1295 uint16_t LlInitConnMem(uint8_t *pFreeMem, uint32_t freeMemSize);
1296 
1297 /*************************************************************************************************/
1298 /*!
1299  * \brief Initialize memory for extended advertising.
1300  *
1301  * \param pFreeMem Pointer to free memory.
1302  * \param freeMemSize Size of pFreeMem.
1303  *
1304  * \return Amount of free memory consumed.
1305  *
1306  * This function allocates memory for extended advertising.
1307  *
1308  * \note This routine must be called after LlInitRunTimeCfg() but only once before any
1309  * other initialization routines.
1310  */
1311 /*************************************************************************************************/
1312 uint16_t LlInitExtAdvMem(uint8_t *pFreeMem, uint32_t freeMemSize);
1313 
1314 /*************************************************************************************************/
1315 /*!
1316  * \brief Initialize memory for extended scanning.
1317  *
1318  * \param pFreeMem Pointer to free memory.
1319  * \param freeMemSize Size of pFreeMem.
1320  *
1321  * \return Amount of free memory consumed.
1322  *
1323  * This function allocates memory for extended scanning.
1324  *
1325  * \note This routine must be called after LlInitRunTimeCfg() but only once before any
1326  * other initialization routines.
1327  */
1328 /*************************************************************************************************/
1329 uint16_t LlInitExtScanMem(uint8_t *pFreeMem, uint32_t freeMemSize);
1330 
1331 /*************************************************************************************************/
1332 /*!
1333  * \brief Initialize LL subsystem for operation as an advertising slave.
1334  *
1335  * \return None.
1336  *
1337  * This function initializes the LL subsystem for use as an advertising slave.
1338  */
1339 /*************************************************************************************************/
1340 void LlAdvSlaveInit(void);
1341 
1342 /*************************************************************************************************/
1343 /*!
1344  * \brief Initialize LL subsystem for operation for extended advertising slave.
1345  *
1346  * \return None.
1347  *
1348  * This function initializes the LL subsystem for use as an extended advertising slave.
1349  */
1350 /*************************************************************************************************/
1351 void LlExtAdvSlaveInit(void);
1352 
1353 /*************************************************************************************************/
1354 /*!
1355  * \brief Initialize LL subsystem for operation as a connectable slave.
1356  *
1357  * \return None.
1358  *
1359  * This function initializes the LL subsystem for use as an advertising and connectable slave.
1360  */
1361 /*************************************************************************************************/
1362 void LlConnSlaveInit(void);
1363 
1364 /*************************************************************************************************/
1365 /*!
1366  * \brief Initialize LL subsystem for operation as a encryptable connectable slave.
1367  *
1368  * \return None.
1369  *
1370  * This function initializes the LL subsystem for use as an advertising and encryptable
1371  * connectable slave.
1372  */
1373 /*************************************************************************************************/
1374 void LlEncConnSlaveInit(void);
1375 
1376 /*************************************************************************************************/
1377 /*!
1378  * \brief Initialize LL subsystem for operation as a scanning master.
1379  *
1380  * \return None.
1381  *
1382  * This function initializes the LL subsystem for use as a scanning master.
1383  */
1384 /*************************************************************************************************/
1385 void LlScanMasterInit(void);
1386 
1387 /*************************************************************************************************/
1388 /*!
1389  * \brief Initialize LL subsystem for operation for extended scanning master.
1390  *
1391  * \return None.
1392  *
1393  * This function initializes the LL subsystem for use as an extended scanning master.
1394  */
1395 /*************************************************************************************************/
1396 void LlExtScanMasterInit(void);
1397 
1398 /*************************************************************************************************/
1399 /*!
1400  * \brief Initialize LL subsystem for operation as an initiating master.
1401  *
1402  * \return None.
1403  *
1404  * This function initializes the LL subsystem for use as an initiating master.
1405  */
1406 /*************************************************************************************************/
1407 void LlInitMasterInit(void);
1408 
1409 /*************************************************************************************************/
1410 /*!
1411  * \brief Initialize LL subsystem for operation as an extended initiating master.
1412  *
1413  * \return None.
1414  *
1415  * This function initializes the LL subsystem for use as an initiating master.
1416  */
1417 /*************************************************************************************************/
1418 void LlExtInitMasterInit(void);
1419 
1420 /*************************************************************************************************/
1421 /*!
1422  * \brief Initialize LL subsystem for operation as a connectable master.
1423  *
1424  * \return None.
1425  *
1426  * This function initializes the LL subsystem for use as a scanning and initiating master.
1427  */
1428 /*************************************************************************************************/
1429 void LlConnMasterInit(void);
1430 
1431 /*************************************************************************************************/
1432 /*!
1433  * \brief Initialize LL subsystem for operation as a encryptable connectable slave.
1434  *
1435  * \return None.
1436  *
1437  * This function initializes the LL subsystem for use as an advertising and encryptable
1438  * connectable slave.
1439  */
1440 /*************************************************************************************************/
1441 void LlEncConnMasterInit(void);
1442 
1443 /*************************************************************************************************/
1444 /*!
1445  * \brief Initialize LL subsystem for operation with privacy.
1446  *
1447  * \return None.
1448  *
1449  * This function initializes the LL subsystem for use with privacy.
1450  */
1451 /*************************************************************************************************/
1452 void LlPrivInit(void);
1453 
1454 /*************************************************************************************************/
1455 /*!
1456  * \brief Initialize LL subsystem for secure connections.
1457  *
1458  * \return None.
1459  *
1460  * This function initializes the LL subsystem for secure connections.
1461  */
1462 /*************************************************************************************************/
1463 void LlScInit(void);
1464 
1465 /*************************************************************************************************/
1466 /*!
1467  * \brief Initialize LL subsystem for PHY features (slave).
1468  *
1469  * \return None.
1470  *
1471  * This function initializes the LL subsystem for slave PHY features.
1472  */
1473 /*************************************************************************************************/
1474 void LlPhySlaveInit(void);
1475 
1476 /*************************************************************************************************/
1477 /*!
1478  * \brief Initialize LL subsystem for PHY features (master).
1479  *
1480  * \return None.
1481  *
1482  * This function initializes the LL subsystem for master PHY features.
1483  */
1484 /*************************************************************************************************/
1485 void LlPhyMasterInit(void);
1486 
1487 /*************************************************************************************************/
1488 /*!
1489  * \brief Initialize LL subsystem for secure connections.
1490  *
1491  * \return None.
1492  *
1493  * This function initializes the LL subsystem for secure connections.
1494  */
1495 /*************************************************************************************************/
1496 void LlChannelSelection2Init(void);
1497 
1498 /*************************************************************************************************/
1499 /*!
1500  * \brief Initialize LL subsystem for test modes.
1501  *
1502  * \return None.
1503  *
1504  * This function initializes the LL subsystem for test modes.
1505  */
1506 /*************************************************************************************************/
1507 void LlTestInit(void);
1508 
1509 /*************************************************************************************************/
1510 /*!
1511  * \brief Initialize LL subsystem with task handler.
1512  *
1513  * \param handlerId WSF handler ID.
1514  *
1515  * \return None.
1516  *
1517  * This function initializes the LL subsystem. It is called once upon system initialization.
1518  * It must be called before any other function in the LL API is called.
1519  */
1520 /*************************************************************************************************/
1521 void LlHandlerInit(wsfHandlerId_t handlerId);
1522 
1523 /*************************************************************************************************/
1524 /*!
1525  * \brief LL message dispatch handler.
1526  *
1527  * \param event WSF event.
1528  * \param pMsg WSF message.
1529  *
1530  * \return None.
1531  */
1532 /*************************************************************************************************/
1533 void LlHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg);
1534 
1535 /*************************************************************************************************/
1536 /*!
1537  * \brief Reset LL subsystem.
1538  *
1539  * \return None.
1540  *
1541  * Reset the LL subsystem. All active connections are closed and all radio procedures such as
1542  * scanning or advertising are terminated.
1543  */
1544 /*************************************************************************************************/
1545 void LlReset(void);
1546 
1547 /*************************************************************************************************/
1548 /*!
1549  * \brief Register LL event handler.
1550  *
1551  * \param evtCback Client callback function.
1552  *
1553  * \return None.
1554  *
1555  * This function is called by a client to register for LL events.
1556  */
1557 /*************************************************************************************************/
1558 void LlEvtRegister(llEvtCback_t evtCback);
1559 
1560 /*************************************************************************************************/
1561 /*!
1562  * \brief Register ACL handler.
1563  *
1564  * \param sendCompCback Client ACL send complete callback function.
1565  * \param recvPendCback Client ACL receive pending callback function.
1566  *
1567  * \return None.
1568  *
1569  * This function is called by a client to register for ACL data.
1570  */
1571 /*************************************************************************************************/
1572 void LlAclRegister(llAclCback_t sendCompCback, llAclCback_t recvPendCback);
1573 
1574 /*************************************************************************************************/
1575 /*!
1576  * \brief Register ISO handler.
1577  *
1578  * \param sendCompCback Client ISO send complete callback function.
1579  * \param recvPendCback Client ISO receive pending callback function.
1580  *
1581  * \return None.
1582  *
1583  * This function is called by a client to register for ISO data.
1584  */
1585 /*************************************************************************************************/
1586 void LlIsoRegister(llIsoCback_t sendCompCback, llIsoCback_t recvPendCback);
1587 
1588 /*! \} */ /* LL_API_INIT */
1589 
1590 /*! \addtogroup LL_API_DEVICE
1591  * \{ */
1592 
1593 /*************************************************************************************************/
1594 /*!
1595  * \brief Set Bluetooth device address
1596  *
1597  * \param pAddr Bluetooth device address.
1598  *
1599  * \return None.
1600  *
1601  * Set the BD address to be used by LL.
1602  */
1603 /*************************************************************************************************/
1604 void LlSetBdAddr(const uint8_t *pAddr);
1605 
1606 /*************************************************************************************************/
1607 /*!
1608  * \brief Get Bluetooth device address
1609  *
1610  * \param pAddr Bluetooth device address.
1611  *
1612  * \return None.
1613  *
1614  * Get the BD address currently used by LL or all zeros if address is not set.
1615  */
1616 /*************************************************************************************************/
1617 void LlGetBdAddr(uint8_t *pAddr);
1618 
1619 /*************************************************************************************************/
1620 /*!
1621  * \brief Set random device address.
1622  *
1623  * \param pAddr Random Bluetooth device address.
1624  *
1625  * \return Status.
1626  *
1627  * Set the random address to be used by LL.
1628  */
1629 /*************************************************************************************************/
1630 uint8_t LlSetRandAddr(const uint8_t *pAddr);
1631 
1632 /*************************************************************************************************/
1633 /*!
1634  * \brief Get random device address.
1635  *
1636  * \param pAddr Random Bluetooth device address.
1637  *
1638  * \return Status error code.
1639  *
1640  * Get the random address currently used by LL or all zeros if address is not set.
1641  */
1642 /*************************************************************************************************/
1643 uint8_t LlGetRandAddr(uint8_t *pAddr);
1644 
1645 /*************************************************************************************************/
1646 /*!
1647  * \brief Get versions
1648  *
1649  * \param pCompId Company ID.
1650  * \param pBtVer Bluetooth version.
1651  * \param pImplRev Implementation revision.
1652  *
1653  * \return None.
1654  */
1655 /*************************************************************************************************/
1656 void LlGetVersion(uint16_t *pCompId, uint8_t *pBtVer, uint16_t *pImplRev);
1657 
1658 /*************************************************************************************************/
1659 /*!
1660  * \brief Get supported states.
1661  *
1662  * \param pStates Supported states bitmask.
1663  *
1664  * \return None.
1665  *
1666  * Return the states supported by the LL.
1667  */
1668 /*************************************************************************************************/
1669 void LlGetSupStates(uint8_t *pStates);
1670 
1671 /*************************************************************************************************/
1672 /*!
1673  * \brief Get features.
1674  *
1675  * \param pFeatures Supported features bitmask.
1676  *
1677  * \return None.
1678  *
1679  * Return the LE features supported by the LL.
1680  */
1681 /*************************************************************************************************/
1682 void LlGetFeatures(uint8_t *pFeatures);
1683 
1684 /*************************************************************************************************/
1685 /*!
1686  * \brief Set features.
1687  *
1688  * \param pFeatures Supported features bitmask.
1689  *
1690  * \return Status error code.
1691  *
1692  * \note This function must only be called when controller is not connected to another
1693  * device.
1694  *
1695  * Set the LE features supported by the LL.
1696  */
1697 /*************************************************************************************************/
1698 uint8_t LlSetFeatures(const uint8_t *pFeatures);
1699 
1700 /*************************************************************************************************/
1701 /*!
1702  * \brief Get random number.
1703  *
1704  * \param pRandNum Buffer to store 8 bytes random data.
1705  *
1706  * \return Status error code.
1707  *
1708  * Request the LL to generate a random number.
1709  */
1710 /*************************************************************************************************/
1711 uint8_t LlGetRandNum(uint8_t *pRandNum);
1712 
1713 /*************************************************************************************************/
1714 /*!
1715  * \brief Get white list size.
1716  *
1717  * \return Total number of white list entries.
1718  *
1719  * Read the white list capacity supported by the LL.
1720  */
1721 /*************************************************************************************************/
1722 uint8_t LlGetWhitelistSize(void);
1723 
1724 /*************************************************************************************************/
1725 /*!
1726  * \brief Clear all white list entries.
1727  *
1728  * \return Status error code.
1729  *
1730  * Clear all white list entries stored in the LL.
1731  *
1732  * \note This function must only be called when advertising or scan is disabled
1733  * and not initiating.
1734  */
1735 /*************************************************************************************************/
1736 uint8_t LlClearWhitelist(void);
1737 
1738 /*************************************************************************************************/
1739 /*!
1740  * \brief Add device to the white list.
1741  *
1742  * \param addrType Address type.
1743  * \param pAddr Bluetooth device address.
1744  *
1745  * \return Status error code.
1746  *
1747  * Adds the given address to the white list stored in the LL.
1748  *
1749  * \note This function must only be called when advertising or scan is disabled
1750  * and not initiating.
1751  */
1752 /*************************************************************************************************/
1753 uint8_t LlAddDeviceToWhitelist(uint8_t addrType, bdAddr_t pAddr);
1754 
1755 /*************************************************************************************************/
1756 /*!
1757  * \brief Remove device from the white list.
1758  *
1759  * \param addrType Address type.
1760  * \param pAddr Bluetooth device address.
1761  *
1762  * \return Status error code.
1763  *
1764  * Removes the given address from the white list stored in the LL.
1765  *
1766  * \note This function must only be called when advertising or scan is disabled
1767  * and not initiating.
1768  */
1769 /*************************************************************************************************/
1770 uint8_t LlRemoveDeviceFromWhitelist(uint8_t addrType, bdAddr_t pAddr);
1771 
1772 /*************************************************************************************************/
1773 /*!
1774  * \brief Add device to resolving list.
1775  *
1776  * \param peerAddrType Peer identity address type.
1777  * \param pPeerIdentityAddr Peer identity address.
1778  * \param pPeerIrk Peer IRK.
1779  * \param pLocalIrk Local IRK.
1780  *
1781  * \return Status error code.
1782  *
1783  * Add device to resolving list.
1784  */
1785 /*************************************************************************************************/
1786 uint8_t LlAddDeviceToResolvingList(uint8_t peerAddrType, const uint8_t *pPeerIdentityAddr, const uint8_t *pPeerIrk, const uint8_t *pLocalIrk);
1787 
1788 /*************************************************************************************************/
1789 /*!
1790  * \brief Remove device from resolving list.
1791  *
1792  * \param peerAddrType Peer identity address type.
1793  * \param pPeerIdentityAddr Peer identity address.
1794  *
1795  * \return Status error code.
1796  *
1797  * Remove device from resolving list.
1798  */
1799 /*************************************************************************************************/
1800 uint8_t LlRemoveDeviceFromResolvingList(uint8_t peerAddrType, const uint8_t *pPeerIdentityAddr);
1801 
1802 /*************************************************************************************************/
1803 /*!
1804  * \brief Clear resolving list.
1805  *
1806  * \return Status error code.
1807  *
1808  * Clear resolving list.
1809  */
1810 /*************************************************************************************************/
1811 uint8_t LlClearResolvingList(void);
1812 
1813 /*************************************************************************************************/
1814 /*!
1815  * \brief Read resolving list size.
1816  *
1817  * \param pSize Storage for resolving list size.
1818  *
1819  * \return Status error code.
1820  *
1821  * Read number of address translation entries that can be stored in the resolving list.
1822  */
1823 /*************************************************************************************************/
1824 uint8_t LlReadResolvingListSize(uint8_t *pSize);
1825 
1826 /*************************************************************************************************/
1827 /*!
1828  * \brief Read peer resolvable address.
1829  *
1830  * \param addrType Peer identity address type.
1831  * \param pIdentityAddr Peer identity address.
1832  * \param pRpa Storage for peer resolvable private address
1833  *
1834  * \return Status error code.
1835  *
1836  * Get the peer resolvable private address that is currently being used for the peer identity
1837  * address.
1838  */
1839 /*************************************************************************************************/
1840 uint8_t LlReadPeerResolvableAddr(uint8_t addrType, const uint8_t *pIdentityAddr, uint8_t *pRpa);
1841 
1842 /*************************************************************************************************/
1843 /*!
1844  * \brief Read local resolvable address.
1845  *
1846  * \param addrType Peer identity address type.
1847  * \param pIdentityAddr Peer identity address.
1848  * \param pRpa Storage for peer resolvable private address
1849  *
1850  * \return Status error code.
1851  *
1852  * Get the local resolvable private address that is currently being used for the peer identity
1853  * address.
1854  */
1855 /*************************************************************************************************/
1856 uint8_t LlReadLocalResolvableAddr(uint8_t addrType, const uint8_t *pIdentityAddr, uint8_t *pRpa);
1857 
1858 /*************************************************************************************************/
1859 /*!
1860  * \brief Enable or disable address resolution.
1861  *
1862  * \param enable Set to TRUE to enable address resolution or FALSE to disable address
1863  * resolution.
1864  *
1865  * \return Status error code.
1866  *
1867  * Enable or disable address resolution so that received local or peer resolvable private
1868  * addresses are resolved.
1869  */
1870 /*************************************************************************************************/
1871 uint8_t LlSetAddrResolutionEnable(uint8_t enable);
1872 
1873 /*************************************************************************************************/
1874 /*!
1875  * \brief Set resolvable private address timeout.
1876  *
1877  * \param rpaTimeout Timeout measured in seconds.
1878  *
1879  * \return Status error code.
1880  *
1881  * Set the time period between automatic generation of new resolvable private addresses.
1882  */
1883 /*************************************************************************************************/
1884 uint8_t LlSetResolvablePrivateAddrTimeout(uint16_t rpaTimeout);
1885 
1886 /*************************************************************************************************/
1887 /*!
1888  * \brief Set privacy mode.
1889  *
1890  * \param peerAddrType Peer identity address type.
1891  * \param pPeerIdentityAddr Peer identity address.
1892  * \param privMode Privacy mode.
1893  *
1894  * \return Status error code.
1895  *
1896  * Allow the host to specify the privacy mode to be used for a given entry on the resolving list.
1897  */
1898 /*************************************************************************************************/
1899 uint8_t LlSetPrivacyMode(uint8_t peerAddrType, const uint8_t *pPeerIdentityAddr, uint8_t privMode);
1900 
1901 /*************************************************************************************************/
1902 /*!
1903  * \brief Generate a P-256 public/private key pair.
1904  *
1905  * \return Status error code.
1906  *
1907  * Generate a P-256 public/private key pair. If another ECC operation (P-256 key pair or Diffie-
1908  * Hellman key generation) is ongoing, an error will be returned.
1909  */
1910 /*************************************************************************************************/
1911 uint8_t LlGenerateP256KeyPair(void);
1912 
1913 /*************************************************************************************************/
1914 /*!
1915  * \brief Generate a Diffie-Hellman key.
1916  *
1917  * \param pubKey_x Remote public key x-coordinate.
1918  * \param pubKey_y Remote public key y-coordinate.
1919  *
1920  * \return Status error code.
1921  *
1922  * Generate a Diffie-Hellman key from a remote public key and the local private key. If another
1923  * ECC operation (P-256 key pair or Diffie-Hellman key generation) is ongoing, an error will be
1924  * returned.
1925  */
1926 /*************************************************************************************************/
1927 uint8_t LlGenerateDhKey(const uint8_t pubKey_x[LL_ECC_KEY_LEN], const uint8_t pubKey_y[LL_ECC_KEY_LEN]);
1928 
1929 /*************************************************************************************************/
1930 /*!
1931  * \brief Generate a Diffie-Hellman key.
1932  *
1933  * \param pubKey_x Remote public key x-coordinate.
1934  * \param pubKey_y Remote public key y-coordinate.
1935  * \param keyType debug enable
1936  *
1937  * \return Status error code.
1938  *
1939  * Generate a Diffie-Hellman key from a remote public key and the local private key. If another
1940  * ECC operation (P-256 key pair or Diffie-Hellman key generation) is ongoing, an error will be
1941  * returned. If keyType == 1, debug keys will be used in place for the keys.
1942  */
1943 /*************************************************************************************************/
1944 uint8_t LlGenerateDhKeyV2(uint8_t pubKey_x[LL_ECC_KEY_LEN], uint8_t pubKey_y[LL_ECC_KEY_LEN], uint8_t keyType);
1945 
1946 /*************************************************************************************************/
1947 /*!
1948  * \brief Set P-256 private key for debug purposes.
1949  *
1950  * \param privKey Private key, or all zeros to clear set private key.
1951  *
1952  * \return Status error code.
1953  *
1954  * Set P-256 private key or clear set private key. The private key will be used for generate key
1955  * pairs and Diffie-Hellman keys until cleared.
1956  */
1957 /*************************************************************************************************/
1958 uint8_t LlSetP256PrivateKey(const uint8_t privKey[LL_ECC_KEY_LEN]);
1959 
1960 /*************************************************************************************************/
1961 /*!
1962  * \brief Set validate public key mode.
1963  *
1964  * \param validateMode ALT1 or ALT2.
1965  *
1966  * \return Status error code.
1967  *
1968  */
1969 /*************************************************************************************************/
1970 uint8_t LlSetValidatePublicKeyMode(uint8_t validateMode);
1971 
1972 /*************************************************************************************************/
1973 /*!
1974  * \brief Set channel class.
1975  *
1976  * \param pChanMap Channel map (0=bad, 1=usable).
1977  *
1978  * \return Status error code.
1979  *
1980  * Set the channel class. At least 2 bits must be set.
1981  */
1982 /*************************************************************************************************/
1983 uint8_t LlSetChannelClass(const uint8_t *pChanMap);
1984 
1985 /*************************************************************************************************/
1986 /*!
1987  * \brief Set HCI supported command
1988  *
1989  * \param byte Byte location of command
1990  * \param bit Bit location of command
1991  * \param enable Enable or disable command
1992  *
1993  * \return Status error code
1994  *
1995  * This will not set a command to supported if it is not actually supported by the device.
1996  * It will only "emulate" non-support of supported commands.
1997  */
1998 /*************************************************************************************************/
1999 uint8_t LlSetHciSupCmd(uint8_t byte, uint8_t bit, bool_t enable);
2000 
2001 /*************************************************************************************************/
2002 /*!
2003  * \brief Set operational mode flags.
2004  *
2005  * \param flags Flags.
2006  * \param enable TRUE to set flags or FALSE to clear flags.
2007  *
2008  * \return Status error code.
2009  *
2010  * Set mode flags governing LL operations.
2011  */
2012 /*************************************************************************************************/
2013 uint8_t LlSetOpFlags(uint32_t flags, bool_t enable);
2014 
2015 /*************************************************************************************************/
2016 /*!
2017  * \brief Set the default Ext adv TX PHY options.
2018  *
2019  * \param phyOptions PHY options.
2020  *
2021  * \return None.
2022  *
2023  * Set the default TX PHY options for extended adv slave primary and secondary channel.
2024  */
2025 /*************************************************************************************************/
2026 void LlSetDefaultExtAdvTxPhyOptions(const uint8_t phyOptions);
2027 
2028 /*! \} */ /* LL_API_DEVICE */
2029 
2030 /*! \addtogroup LL_API_BROADCAST
2031  * \{ */
2032 
2033 /*************************************************************************************************/
2034 /*!
2035  * \brief Set advertising transmit power.
2036  *
2037  * \param advTxPwr Advertising transmit power level.
2038  *
2039  * \return None.
2040  *
2041  * Set the advertising transmit power.
2042  */
2043 /*************************************************************************************************/
2044 void LlSetAdvTxPower(int8_t advTxPwr);
2045 
2046 /*************************************************************************************************/
2047 /*!
2048  * \brief Get advertising transmit power.
2049  *
2050  * \param pAdvTxPwr Advertising transmit power level.
2051  *
2052  * \return Status error code.
2053  *
2054  * Return the advertising transmit power.
2055  */
2056 /*************************************************************************************************/
2057 uint8_t LlGetAdvTxPower(int8_t *pAdvTxPwr);
2058 
2059 /*************************************************************************************************/
2060 /*!
2061  * \brief Set advertising parameter.
2062  *
2063  * \param advIntervalMin Minimum advertising interval.
2064  * \param advIntervalMax Maximum advertising interval.
2065  * \param advType Advertising type.
2066  * \param ownAddrType Address type used by this device.
2067  * \param peerAddrType Address type of peer device. Only used for directed advertising.
2068  * \param pPeerAddr Address of peer device. Only used for directed advertising.
2069  * \param advChanMap Advertising channel map.
2070  * \param advFiltPolicy Advertising filter policy.
2071  *
2072  * \return Status error code.
2073  *
2074  * Set advertising parameters.
2075  *
2076  * \note This function must only be called when advertising is disabled.
2077  */
2078 /*************************************************************************************************/
2079 uint8_t LlSetAdvParam(uint16_t advIntervalMin, uint16_t advIntervalMax, uint8_t advType,
2080  uint8_t ownAddrType, uint8_t peerAddrType, const uint8_t *pPeerAddr,
2081  uint8_t advChanMap, uint8_t advFiltPolicy);
2082 
2083 /*************************************************************************************************/
2084 /*!
2085  * \brief Set advertising data.
2086  *
2087  * \param len Data buffer length.
2088  * \param pData Advertising data buffer.
2089  *
2090  * \return Status error code.
2091  *
2092  * Set advertising data data.
2093  */
2094 /*************************************************************************************************/
2095 uint8_t LlSetAdvData(uint8_t len, const uint8_t *pData);
2096 
2097 /*************************************************************************************************/
2098 /*!
2099  * \brief Set scan response data.
2100  *
2101  * \param len Data buffer length.
2102  * \param pData Scan response data buffer.
2103  *
2104  * \return Status error code.
2105  *
2106  * Set scan response data.
2107  */
2108 /*************************************************************************************************/
2109 uint8_t LlSetScanRespData(uint8_t len, const uint8_t *pData);
2110 
2111 /*************************************************************************************************/
2112 /*!
2113  * \brief Advertising enable.
2114  *
2115  * \param enable Set to TRUE to enable advertising, FALSE to disable advertising.
2116  *
2117  * \return None.
2118 
2119  * Enable or disable advertising.
2120  */
2121 /*************************************************************************************************/
2122 void LlAdvEnable(uint8_t enable);
2123 
2124 /*************************************************************************************************/
2125 /*!
2126  * \brief Set advertising set random device address.
2127  *
2128  * \param handle Advertising handle.
2129  * \param pAddr Random Bluetooth device address.
2130  *
2131  * \return Status error code.
2132  *
2133  * Set the random address to be used by a advertising set.
2134  */
2135 /*************************************************************************************************/
2136 uint8_t LlSetAdvSetRandAddr(uint8_t handle, const uint8_t *pAddr);
2137 
2138 /*************************************************************************************************/
2139 /*!
2140  * \brief Get periodic channel map.
2141  *
2142  * \param handle Periodic advertiser/scanner handle.
2143  * \param isAdv TRUE for periodic advertiser, FALSE for periodic scanner.
2144  *
2145  * \return 64-bit formatted channel mask.
2146  *
2147  * Get the 64-bit channel mask of the channel map
2148  */
2149 /*************************************************************************************************/
2150 uint64_t LlGetPeriodicChanMap(uint16_t handle, bool_t isAdv);
2151 
2152 /*************************************************************************************************/
2153 /*!
2154  * \brief Get advertising set random device address.
2155  *
2156  * \param handle Advertising handle.
2157  * \param pAddr Random Bluetooth device address.
2158  *
2159  * \return Status error code.
2160  *
2161  * Get the random address to be used by a advertising set.
2162  */
2163 /*************************************************************************************************/
2164 uint8_t LlGetAdvSetRandAddr(uint8_t handle, uint8_t *pAddr);
2165 
2166 /*************************************************************************************************/
2167 /*!
2168  * \brief Set extended advertising parameters.
2169  *
2170  * \param handle Advertising handle.
2171  * \param pExtAdvParam Extended advertising parameters.
2172  *
2173  * \return Status error code.
2174  *
2175  * Set extended advertising parameters.
2176  *
2177  * \note This function must only be called when advertising for this set is disabled.
2178  */
2179 /*************************************************************************************************/
2180 uint8_t LlSetExtAdvParam(uint8_t handle, LlExtAdvParam_t *pExtAdvParam);
2181 
2182 /*************************************************************************************************/
2183 /*!
2184  * \brief Get extended advertising TX power level.
2185  *
2186  * \param handle Advertising handle.
2187  * \param pLevel Transmit power level.
2188  *
2189  * \return Status error code.
2190  *
2191  * Get the TX power of an advertising set.
2192  */
2193 /*************************************************************************************************/
2194 uint8_t LlGetExtAdvTxPowerLevel(uint16_t handle, int8_t *pLevel);
2195 
2196 /*************************************************************************************************/
2197 /*!
2198  * \brief Set extended advertising data.
2199  *
2200  * \param handle Advertising handle.
2201  * \param op Operation.
2202  * \param fragPref Fragment preference.
2203  * \param len Data buffer length.
2204  * \param pData Advertising data buffer.
2205  *
2206  * \return Status error code.
2207  *
2208  * Set extended advertising data data.
2209  */
2210 /*************************************************************************************************/
2211 uint8_t LlSetExtAdvData(uint8_t handle, uint8_t op, uint8_t fragPref, uint8_t len, const uint8_t *pData);
2212 
2213 /*************************************************************************************************/
2214 /*!
2215  * \brief Set extended scan response data.
2216  *
2217  * \param handle Advertising handle.
2218  * \param op Operation.
2219  * \param fragPref Fragment preference.
2220  * \param len Data buffer length.
2221  * \param pData Scan response data buffer.
2222  *
2223  * \return Status error code.
2224  *
2225  * Set extended scan response data.
2226  */
2227 /*************************************************************************************************/
2228 uint8_t LlSetExtScanRespData(uint8_t handle, uint8_t op, uint8_t fragPref, uint8_t len, const uint8_t *pData);
2229 
2230 /*************************************************************************************************/
2231 /*!
2232  * \brief Extended advertising enable.
2233  *
2234  * \param enable Set to TRUE to enable advertising, FALSE to disable advertising.
2235  * \param numAdvSets Number of elements in enaParam[].
2236  * \param enaParam Enable parameter table.
2237  *
2238  * \return None.
2239  *
2240  * Enable or disable extended advertising.
2241  */
2242 /*************************************************************************************************/
2243 void LlExtAdvEnable(uint8_t enable, uint8_t numAdvSets, LlExtAdvEnableParam_t enaParam[]);
2244 
2245 /*************************************************************************************************/
2246 /*!
2247  * \brief Read maximum advertising data length.
2248  *
2249  * \param pLen Return buffer for Maximum data length.
2250  *
2251  * \return Status error code.
2252  *
2253  * Read maximum advertising data length.
2254  */
2255 /*************************************************************************************************/
2256 uint8_t LlReadMaxAdvDataLen(uint16_t *pLen);
2257 
2258 /*************************************************************************************************/
2259 /*!
2260  * \brief Read number of supported advertising sets.
2261  *
2262  * \param pNumSets Return buffer for number of advertising sets.
2263  *
2264  * \return Status error code.
2265  *
2266  * Read number of supported advertising sets.
2267  */
2268 /*************************************************************************************************/
2269 uint8_t LlReadNumSupAdvSets(uint8_t *pNumSets);
2270 
2271 /*************************************************************************************************/
2272 /*!
2273  * \brief Remove advertising set.
2274  *
2275  * \param handle Advertising handle.
2276  *
2277  * \return Status error code.
2278  *
2279  * Removes the an advertising set from the LL.
2280  */
2281 /*************************************************************************************************/
2282 uint8_t LlRemoveAdvSet(uint8_t handle);
2283 
2284 /*************************************************************************************************/
2285 /*!
2286  * \brief Clear advertising sets.
2287  *
2288  * \return Status error code.
2289  *
2290  * Remove all existing advertising sets from the LL.
2291  */
2292 /*************************************************************************************************/
2293 uint8_t LlClearAdvSets(void);
2294 
2295 /*************************************************************************************************/
2296 /*!
2297  * \brief Set periodic advertising parameters.
2298  *
2299  * \param handle Advertising handle.
2300  * \param pPerAdvParam Periodic advertising parameters.
2301  *
2302  * \return Status error code.
2303  *
2304  * Set periodic advertising parameters.
2305  *
2306  * \note This function must only be called when advertising handle exists.
2307  */
2308 /*************************************************************************************************/
2309 uint8_t LlSetPeriodicAdvParam(uint8_t handle, LlPerAdvParam_t *pPerAdvParam);
2310 
2311 /*************************************************************************************************/
2312 /*!
2313  * \brief Set periodic advertising data.
2314  *
2315  * \param handle Advertising handle.
2316  * \param op Operation.
2317  * \param len Data buffer length.
2318  * \param pData Advertising data buffer.
2319  *
2320  * \return Status error code.
2321  *
2322  * Set periodic advertising data.
2323  */
2324 /*************************************************************************************************/
2325 uint8_t LlSetPeriodicAdvData(uint8_t handle, uint8_t op, uint8_t len, const uint8_t *pData);
2326 
2327 /*************************************************************************************************/
2328 /*!
2329  * \brief Set periodic advertising enable.
2330  *
2331  * \param enable TRUE to enable advertising, FALSE to disable advertising.
2332  * \param handle Advertising handle.
2333  *
2334  * \return Status error code.
2335  *
2336  * Enable or disable periodic advertising.
2337  */
2338 /*************************************************************************************************/
2339 void LlSetPeriodicAdvEnable(uint8_t enable, uint8_t handle);
2340 
2341 /*************************************************************************************************/
2342 /*!
2343  * \brief Set auxiliary packet offset delay.
2344  *
2345  * \param handle Advertising handle.
2346  * \param delayUsec Additional time in microseconds. "0" to disable.
2347  *
2348  * \return Status error code.
2349  *
2350  * Additional delay given to auxiliary packets specified by AuxPtr. Offset values are
2351  * limited by the advertising interval.
2352  */
2353 /*************************************************************************************************/
2354 uint8_t LlSetAuxOffsetDelay(uint8_t handle, uint32_t delayUsec);
2355 
2356 /*************************************************************************************************/
2357 /*!
2358  * \brief Set extended advertising data fragmentation length.
2359  *
2360  * \param handle Advertising handle.
2361  * \param fragLen Fragmentation length.
2362  *
2363  * \return Status error code.
2364  *
2365  * Fragmentation size for Advertising Data and Scan Response Data when selected by the host.
2366  */
2367 /*************************************************************************************************/
2368 uint8_t LlSetExtAdvDataFragLen(uint8_t handle, uint8_t fragLen);
2369 
2370 /*************************************************************************************************/
2371 /*!
2372  * \brief Set extended advertising transmit PHY options.
2373  *
2374  * \param handle Advertising handle.
2375  * \param priPhyOpts Primary advertising channel PHY options.
2376  * \param secPhyOpts Secondary advertising channel PHY options.
2377  *
2378  * \return Status error code.
2379  *
2380  * PHY options for extended advertising transmissions. New values are applied dynamically.
2381  */
2382 /*************************************************************************************************/
2383 uint8_t LlSetExtAdvTxPhyOptions(uint8_t handle, uint8_t priPhyOpts, uint8_t secPhyOpts);
2384 
2385 /*************************************************************************************************/
2386 /*!
2387  * \brief Read supported transmit power.
2388  *
2389  * \param pMinTxPwr Return buffer for minimum transmit power.
2390  * \param pMaxTxPwr Return buffer for maximum transmit power.
2391  *
2392  * \return None.
2393  *
2394  * Read the minimum and maximum transmit powers supported by the LL.
2395  */
2396 /*************************************************************************************************/
2397 void LlReadSupTxPower(int8_t *pMinTxPwr, int8_t *pMaxTxPwr);
2398 
2399 /*************************************************************************************************/
2400 /*!
2401  * \brief Read RF path compensation.
2402  *
2403  * \param pTxPathComp Return buffer for RF transmit path compensation value.
2404  * \param pRxPathComp Return buffer for RF receive path compensation value.
2405  *
2406  * \return None.
2407  *
2408  * Read the RF Path Compensation Values parameter used in the Tx Power Level and RSSI calculation.
2409  */
2410 /*************************************************************************************************/
2411 void LlReadRfPathComp(int16_t *pTxPathComp, int16_t *pRxPathComp);
2412 
2413 /*************************************************************************************************/
2414 /*!
2415  * \brief Write RF path compensation.
2416  *
2417  * \param txPathComp RF transmit path compensation value.
2418  * \param rxPathComp RF receive path compensation value.
2419  *
2420  * \return Status error code.
2421  *
2422  * Indicate the RF path gain or loss between the RF transceiver and the antenna contributed by
2423  * intermediate components.
2424  */
2425 /*************************************************************************************************/
2426 uint8_t LlWriteRfPathComp(int16_t txPathComp, int16_t rxPathComp);
2427 
2428 /*************************************************************************************************/
2429 /*!
2430  * \brief Scan report enable.
2431  *
2432  * \param enable Set to TRUE to enable scan reports, FALSE to disable scan reports.
2433  *
2434  * \return None.
2435  *
2436  * Enable or disable reports about the scanners from which an advertiser receives scan requests.
2437  */
2438 /*************************************************************************************************/
2439 void LlScanReportEnable(uint8_t enable);
2440 
2441 /*! \} */ /* LL_API_BROADCAST */
2442 
2443 /*! \addtogroup LL_API_OBSERVER
2444  * \{ */
2445 
2446 /*************************************************************************************************/
2447 /*!
2448  * \brief Set scan channel map.
2449  *
2450  * \param chanMap Scan channel map.
2451  *
2452  * \return Status error code.
2453  *
2454  * Set scan channel map.
2455  *
2456  * \note This function must only be called when scanning is disabled.
2457  */
2458 /*************************************************************************************************/
2459 uint8_t LlSetSetScanChanMap(uint8_t chanMap);
2460 
2461 /*************************************************************************************************/
2462 /*!
2463  * \brief Set scan parameters.
2464  *
2465  * \param pParam Scan parameters.
2466  *
2467  * \return Status error code.
2468  *
2469  * Set scan parameters.
2470  *
2471  * \note This function must only be called when scanning is disabled.
2472  */
2473 /*************************************************************************************************/
2474 uint8_t LlSetScanParam(const LlScanParam_t *pParam);
2475 
2476 /*************************************************************************************************/
2477 /*!
2478  * \brief Scan enable.
2479  *
2480  * \param enable Set to TRUE to enable scanning, FALSE to disable scanning.
2481  * \param filterDup Set to TRUE to filter duplicates.
2482  *
2483  * \return None.
2484  *
2485  * Enable or disable scanning. This function is only used when operating in master role.
2486  */
2487 /*************************************************************************************************/
2488 void LlScanEnable(uint8_t enable, uint8_t filterDup);
2489 
2490 /*************************************************************************************************/
2491 /*!
2492  * \brief Set extended scanning parameters.
2493  *
2494  * \param ownAddrType Address type used by this device.
2495  * \param scanFiltPolicy Scan filter policy.
2496  * \param scanPhys Scanning PHYs bitmask.
2497  * \param param Scanning parameter table indexed by PHY.
2498  *
2499  * \return Status error code.
2500  *
2501  * Set the extended scan parameters to be used on the primary advertising channel.
2502  */
2503 /*************************************************************************************************/
2504 uint8_t LlSetExtScanParam(uint8_t ownAddrType, uint8_t scanFiltPolicy, uint8_t scanPhys, const LlExtScanParam_t param[]);
2505 
2506 /*************************************************************************************************/
2507 /*!
2508  * \brief Extended scan enable.
2509  *
2510  * \param enable Set to TRUE to enable scanning, FALSE to disable scanning.
2511  * \param filterDup Set to TRUE to filter duplicates.
2512  * \param duration Duration.
2513  * \param period Period.
2514  *
2515  * \return None.
2516  *
2517  * Enable or disable extended scanning.
2518  */
2519 /*************************************************************************************************/
2520 void LlExtScanEnable(uint8_t enable, uint8_t filterDup, uint16_t duration, uint16_t period);
2521 
2522 /*************************************************************************************************/
2523 /*!
2524  * \brief Create synchronization of periodic advertising.
2525  *
2526  * \param pParam Create sync parameters.
2527  *
2528  * \return Status error code.
2529  *
2530  * Create synchronization of periodic advertising.
2531  */
2532 /*************************************************************************************************/
2533 uint8_t LlPeriodicAdvCreateSync(const LlPerAdvCreateSyncCmd_t *pParam);
2534 
2535 /*************************************************************************************************/
2536 /*!
2537  * \brief Cancel pending synchronization of periodic advertising.
2538  *
2539  * \return Status error code.
2540  *
2541  * Cancel pending synchronization of periodic advertising.
2542  */
2543 /*************************************************************************************************/
2544 uint8_t LlPeriodicAdvCreateSyncCancel(void);
2545 
2546 /*************************************************************************************************/
2547 /*!
2548  * \brief Stop synchronization of periodic advertising.
2549  *
2550  * \param syncHandle Sync handle.
2551  *
2552  * \return Status error code.
2553  *
2554  * Stop synchronization of periodic advertising.
2555  */
2556 /*************************************************************************************************/
2557 uint8_t LlPeriodicAdvTerminateSync(uint16_t syncHandle);
2558 
2559 /*************************************************************************************************/
2560 /*!
2561  * \brief Add device to periodic advertiser list.
2562  *
2563  * \param pParam Add to periodic list parameters.
2564  *
2565  * \return Status error code.
2566  *
2567  * Add device to periodic advertiser list.
2568  */
2569 /*************************************************************************************************/
2570 uint8_t LlAddDeviceToPeriodicAdvList(const LlDevicePerAdvList_t *pParam);
2571 
2572 /*************************************************************************************************/
2573 /*!
2574  * \brief Remove device from periodic advertiser list command.
2575  *
2576  * \param pParam Remove from periodic list parameters.
2577  *
2578  * \return Status error code.
2579  *
2580  *
2581  */
2582 /*************************************************************************************************/
2584 
2585 /*************************************************************************************************/
2586 /*!
2587  * \brief Clear all devices in periodic advertiser list command.
2588  *
2589  * \return Status error code.
2590  *
2591  * Clear all devices in periodic advertiser list command.
2592  */
2593 /*************************************************************************************************/
2594 uint8_t LlClearPeriodicAdvList(void);
2595 
2596 /*************************************************************************************************/
2597 /*!
2598  * \brief Read total number of devices in periodic advertiser list command.
2599  *
2600  * \param pListSize Return size value of periodic advertiser list
2601  *
2602  * \return Status error code.
2603  *
2604  * Read total number of devices in periodic advertiser list command.
2605  */
2606 /*************************************************************************************************/
2607 uint8_t LlReadPeriodicAdvListSize(uint8_t *pListSize);
2608 
2609 /*************************************************************************************************/
2610 /*!
2611  * \brief Enable or disable reports for the periodic advertising sync.
2612  *
2613  * \param syncHandle Periodic sync handle.
2614  * \param enable 1 to enable reports, 0 to disable reports.
2615  *
2616  * \return Status error code.
2617  *
2618  * Enable or disable reports for the periodic advertising sync.
2619  */
2620 /*************************************************************************************************/
2621 uint8_t LlSetPeriodicAdvRcvEnable(uint16_t syncHandle, uint8_t enable);
2622 
2623 /*************************************************************************************************/
2624 /*!
2625  * \brief Initialize LL subsystem for PAST(Periodic advertising sync transfer).
2626  *
2627  * \return None.
2628  *
2629  * This function initializes the LL subsystem for PAST(Periodic advertising sync transfer).
2630  */
2631 /*************************************************************************************************/
2632 void LlPastInit(void);
2633 
2634 /*************************************************************************************************/
2635 /*!
2636  * \brief Send sync info about periodic advertising to a connected device.
2637  *
2638  * \param connHandle Connection handle.
2639  * \param serviceData Service data provided by the host.
2640  * \param syncHandle Periodic sync handle.
2641  *
2642  * \return Status error code.
2643  *
2644  * Send sync info about periodic advertising to a connected device.
2645  */
2646 /*************************************************************************************************/
2647 uint8_t LlPeriodicAdvSyncTransfer(uint16_t connHandle, uint16_t serviceData, uint16_t syncHandle);
2648 
2649 /*************************************************************************************************/
2650 /*!
2651  * \brief Send sync info about periodic adv in an advertising set to a connected device.
2652  *
2653  * \param connHandle Connection handle.
2654  * \param serviceData Service data provided by the host.
2655  * \param advHandle Handle to identify an advertising set.
2656  *
2657  * \return Status error code.
2658  *
2659  * Send sync info about periodic adv in an advertising set to a connected device.
2660  */
2661 /*************************************************************************************************/
2662 uint8_t LlPeriodicAdvSetInfoTransfer(uint16_t connHandle, uint16_t serviceData, uint8_t advHandle);
2663 
2664 /*************************************************************************************************/
2665 /*!
2666  * \brief Set periodic advertising sync transfer parameters.
2667  *
2668  * \param connHandle Connection handle.
2669  * \param mode Periodic sync advertising sync transfer mode.
2670  * \param skip The number of periodic advertising packets that can be skipped after a successful receive.
2671  * \param syncTimeout Synchronization timeout for the periodic advertising.
2672  * \param cteType Constant tone extension type(Used in AoD/AoA).
2673  *
2674  * \return Status error code.
2675  *
2676  * Set periodic advertising sync transfer parameters.
2677  */
2678 /*************************************************************************************************/
2679 uint8_t LlSetPeriodicAdvSyncTransParams(uint16_t connHandle, uint8_t mode, uint16_t skip, uint16_t syncTimeout, uint8_t cteType);
2680 
2681 /*************************************************************************************************/
2682 /*!
2683  * \brief Set default periodic advertising sync transfer parameters.
2684  *
2685  * \param mode Periodic sync advertising sync transfer mode.
2686  * \param skip The number of periodic advertising packets that can be skipped after a successful receive.
2687  * \param syncTimeout Synchronization timeout for the periodic advertising.
2688  * \param cteType Constant tone extension type(Used in AoD/AoA).
2689  *
2690  * \return Status error code.
2691  *
2692  * Set default periodic advertising sync transfer parameters.
2693  */
2694 /*************************************************************************************************/
2695 uint8_t LlSetDefaultPeriodicAdvSyncTransParams(uint8_t mode, uint16_t skip, uint16_t syncTimeout, uint8_t cteType);
2696 
2697 /*! \} */ /* LL_API_OBSERVER */
2698 
2699 /*! \addtogroup LL_API_CONN
2700  * \{ */
2701 
2702 /*************************************************************************************************/
2703 /*!
2704  * \brief Disconnect a connection.
2705  *
2706  * \param handle Connection handle.
2707  * \param reason Disconnect reason.
2708  *
2709  * \return Status error code.
2710  *
2711  * Disconnect a connection.
2712  */
2713 /*************************************************************************************************/
2714 uint8_t LlDisconnect(uint16_t handle, uint8_t reason);
2715 
2716 /*************************************************************************************************/
2717 /*!
2718  * \brief Set connection's operational mode flags.
2719  *
2720  * \param handle Connection handle.
2721  * \param flags Flags.
2722  * \param enable TRUE to set flags or FALSE to clear flags.
2723  *
2724  * \return Status error code.
2725  *
2726  * Set connection's operational mode flags governing LL operations.
2727  */
2728 /*************************************************************************************************/
2729 uint8_t LlSetConnOpFlags(uint16_t handle, uint32_t flags, bool_t enable);
2730 
2731 /*************************************************************************************************/
2732 /*!
2733  * \brief Read remote features.
2734  *
2735  * \param handle Connection handle.
2736  *
2737  * \return Status error code.
2738  *
2739  * Read the link layer features of the remote device.
2740  */
2741 /*************************************************************************************************/
2742 uint8_t LlReadRemoteFeat(uint16_t handle);
2743 
2744 /*************************************************************************************************/
2745 /*!
2746  * \brief Read remote version information.
2747  *
2748  * \param handle Connection handle.
2749  *
2750  * \return Status error code.
2751  *
2752  * Read the version information of the remote device.
2753  */
2754 /*************************************************************************************************/
2755 uint8_t LlReadRemoteVerInfo(uint16_t handle);
2756 
2757 /*************************************************************************************************/
2758 /*!
2759  * \brief Get RSSI of a connection.
2760  *
2761  * \param handle Connection handle.
2762  * \param pRssi RSSI value.
2763  *
2764  * \return Status error code.
2765  *
2766  * Get the current RSSI of a connection.
2767  */
2768 /*************************************************************************************************/
2769 uint8_t LlGetRssi(uint16_t handle, int8_t *pRssi);
2770 
2771 /*************************************************************************************************/
2772 /*!
2773  * \brief Get connection's TX power level.
2774  *
2775  * \param handle Connection handle.
2776  * \param type Power level type.
2777  * \param pLevel Transmit power level.
2778  *
2779  * \return Status error code.
2780  *
2781  * Get the TX power of a connection.
2782  */
2783 /*************************************************************************************************/
2784 uint8_t LlGetTxPowerLevel(uint16_t handle, uint8_t type, int8_t *pLevel);
2785 
2786 /*************************************************************************************************/
2787 /*!
2788  * \brief Set connection's TX power level.
2789  *
2790  * \param handle Connection handle.
2791  * \param level Transmit power level.
2792  *
2793  * \return Status error code.
2794  *
2795  * Set the TX power of a connection.
2796  */
2797 /*************************************************************************************************/
2798 uint8_t LlSetTxPowerLevel(uint16_t handle, int8_t level);
2799 
2800 /*************************************************************************************************/
2801 /*!
2802  * \brief Update connection parameters.
2803  *
2804  * \param handle Connection handle.
2805  * \param pConnSpec New connection specification.
2806  *
2807  * \return Status error code.
2808  *
2809  * Update the connection parameters of a connection.
2810  */
2811 /*************************************************************************************************/
2812 uint8_t LlConnUpdate(uint16_t handle, const LlConnSpec_t *pConnSpec);
2813 
2814 /*************************************************************************************************/
2815 /*!
2816  * \brief Remote connection parameter request reply.
2817  *
2818  * \param handle Connection handle.
2819  * \param pConnSpec New connection specification.
2820  *
2821  * \return Status error code.
2822  *
2823  * Reply to a connection parameter request.
2824  */
2825 /*************************************************************************************************/
2826 uint8_t LlRemoteConnParamReqReply(uint16_t handle, const LlConnSpec_t *pConnSpec);
2827 
2828 /*************************************************************************************************/
2829 /*!
2830  * \brief Remote connection parameter request negative reply.
2831  *
2832  * \param handle Connection handle.
2833  * \param reason Reason code.
2834  *
2835  * \return None.
2836  *
2837  * Negative reply to a connection parameter request.
2838  */
2839 /*************************************************************************************************/
2840 uint8_t LlRemoteConnParamReqNegReply(uint16_t handle, uint8_t reason);
2841 
2842 /*************************************************************************************************/
2843 /*!
2844  * \brief Set connection's channel map.
2845  *
2846  * \param handle Connection handle.
2847  * \param pChanMap Channel map.
2848  *
2849  * \return Status error code.
2850  *
2851  * Set the channel map of a connection.
2852  */
2853 /*************************************************************************************************/
2854 uint8_t LlSetChannelMap(uint16_t handle, const uint8_t *pChanMap);
2855 
2856 /*************************************************************************************************/
2857 /*!
2858  * \brief Get connection's channel map.
2859  *
2860  * \param handle Connection handle.
2861  * \param pChanMap Channel map.
2862  *
2863  * \return Status error code.
2864  *
2865  * Get the current channel map of a connection.
2866  */
2867 /*************************************************************************************************/
2868 uint8_t LlGetChannelMap(uint16_t handle, uint8_t *pChanMap);
2869 
2870 /*************************************************************************************************/
2871 /*!
2872  * \brief Set data length.
2873  *
2874  * \param handle Connection handle.
2875  * \param txLen Maximum number of payload bytes for a Data PDU
2876  * \param txTime Maximum microseconds for a Data PDU
2877  *
2878  * \return Status error code.
2879  *
2880  * Preferred maximum microseconds that the local Controller should use to transmit a
2881  * single Link Layer Data Channel PDU.
2882  */
2883 /*************************************************************************************************/
2884 uint8_t LlSetDataLen(uint16_t handle, uint16_t txLen, uint16_t txTime);
2885 
2886 /*************************************************************************************************/
2887 /*!
2888  * \brief Read default data length.
2889  *
2890  * \param pMaxTxLen Maximum number of payload bytes for a Data PDU
2891  * \param pMaxTxTime Maximum microseconds for a Data PDU
2892  *
2893  * \return None.
2894  *
2895  * Suggested length and microseconds that the local Controller should use to transmit a
2896  * single Link Layer Data Channel PDU.
2897  */
2898 /*************************************************************************************************/
2899 void LlReadDefaultDataLen(uint16_t *pMaxTxLen, uint16_t *pMaxTxTime);
2900 
2901 /*************************************************************************************************/
2902 /*!
2903  * \brief Write default data length.
2904  *
2905  * \param maxTxLen Maximum number of payload bytes for a Data PDU
2906  * \param maxTxTime Maximum microseconds for a Data PDU
2907  *
2908  * \return Status error code.
2909  *
2910  * Suggested length and microseconds that the local Controller should use to transmit a
2911  * single Link Layer Data Channel PDU.
2912  */
2913 /*************************************************************************************************/
2914 uint8_t LlWriteDefaultDataLen(uint16_t maxTxLen, uint16_t maxTxTime);
2915 
2916 /*************************************************************************************************/
2917 /*!
2918  * \brief Read maximum data length.
2919  *
2920  * \param pMaxTxLen Maximum number of payload bytes for a Tx Data PDU
2921  * \param pMaxTxTime Maximum microseconds for a Tx Data PDU
2922  * \param pMaxRxLen Maximum number of payload bytes for a Rx Data PDU
2923  * \param pMaxRxTime Maximum microseconds for a Rx Data PDU
2924  *
2925  * \return None.
2926  *
2927  * Read the Controller's maximum supported payload octets and packet duration times for
2928  * transmission and reception.
2929  */
2930 /*************************************************************************************************/
2931 void LlReadMaximumDataLen(uint16_t *pMaxTxLen, uint16_t *pMaxTxTime, uint16_t *pMaxRxLen, uint16_t *pMaxRxTime);
2932 
2933 /*************************************************************************************************/
2934 /*!
2935  * \brief Read current transmitter PHY and receive PHY.
2936  *
2937  * \param handle Connection handle.
2938  * \param pTxPhy Storage for transmitter PHY.
2939  * \param pRxPhy Storage for receiver PHY.
2940  *
2941  * \return Status error code.
2942  *
2943  * Read current transmitter PHY and receive PHY.
2944  */
2945 /*************************************************************************************************/
2946 uint8_t LlReadPhy(uint16_t handle, uint8_t *pTxPhy, uint8_t *pRxPhy);
2947 
2948 /*************************************************************************************************/
2949 /*!
2950  * \brief Set default PHYs.
2951  *
2952  * \param allPhys All PHYs preferences.
2953  * \param txPhys Preferred transmitter PHYs.
2954  * \param rxPhys Preferred receiver PHYs.
2955  *
2956  * \return Status error code.
2957  *
2958  * Specify the preferred values for the transmitter PHY and receiver PHY to be used for all
2959  * subsequent connections over the LE transport.
2960  */
2961 /*************************************************************************************************/
2962 uint8_t LlSetDefaultPhy(uint8_t allPhys, uint8_t txPhys, uint8_t rxPhys);
2963 
2964 /*************************************************************************************************/
2965 /*!
2966  * \brief Set PHY for a connection.
2967  *
2968  * \param handle Connection handle.
2969  * \param allPhys All PHYs preferences.
2970  * \param txPhys Preferred transmitter PHYs.
2971  * \param rxPhys Preferred receiver PHYs.
2972  * \param phyOptions PHY options.
2973  *
2974  * \return Status error code.
2975  *
2976  * Set PHY preferences for a given connection. The controller might not be able to make the
2977  * change (e.g., because the peer does not support the requested PHY) or may decide that the
2978  * current PHY is preferable.
2979  */
2980 /*************************************************************************************************/
2981 uint8_t LlSetPhy(uint16_t handle, uint8_t allPhys, uint8_t txPhys, uint8_t rxPhys, uint16_t phyOptions);
2982 
2983 /*************************************************************************************************/
2984 /*!
2985  * \brief Set local minimum number of used channels.
2986  *
2987  * \param phys Bitmask for the PHYs.
2988  * \param pwrThres Power threshold.
2989  * \param minUsedCh Minimum number of used channels.
2990  *
2991  * \return Status error code.
2992  *
2993  * Set local minimum number of used channels.
2994  */
2995 /*************************************************************************************************/
2996 uint8_t LlSetLocalMinUsedChan(uint8_t phys, int8_t pwrThres, uint8_t minUsedCh);
2997 
2998 /*************************************************************************************************/
2999 /*!
3000  * \brief Get peer minimum number of used channels.
3001  *
3002  * \param handle Connection handle.
3003  * \param pPeerMinUsedChan Storage for the peer minimum number of used channels.
3004  *
3005  * \return Status error code.
3006  *
3007  * Get peer minimum number of used channels.
3008  */
3009 /*************************************************************************************************/
3010 uint8_t LlGetPeerMinUsedChan(uint16_t handle, uint8_t *pPeerMinUsedChan);
3011 
3012 /*************************************************************************************************/
3013 /*!
3014  * \brief Used to read the sleep clock accuracy of the peer device.
3015  *
3016  * \param aclHandle Handle of the ACL.
3017  *
3018  * \return Status error code.
3019  */
3020 /*************************************************************************************************/
3021 uint8_t LlRequestPeerSca(uint16_t aclHandle);
3022 
3023 /*! \} */ /* LL_API_CONN */
3024 
3025 /*! \addtogroup LL_API_CENTRAL
3026  * \{ */
3027 
3028 /*************************************************************************************************/
3029 /*!
3030  * \brief Create connection.
3031  *
3032  * \param pInitParam Initiating parameters.
3033  * \param pConnSpec Connection specification.
3034  *
3035  * \return Status error code.
3036  *
3037  * Create a connection to the specified peer address with the specified connection parameters.
3038  * This function is only when operating in master role.
3039  */
3040 /*************************************************************************************************/
3041 uint8_t LlCreateConn(const LlInitParam_t *pInitParam, const LlConnSpec_t *pConnSpec);
3042 
3043 /*************************************************************************************************/
3044 /*!
3045  * \brief Extended create connection.
3046  *
3047  * \param pInitParam Initiating parameters.
3048  * \param scanParam Scan parameters table indexed by PHY.
3049  * \param connSpec Connection specification table indexed by PHY.
3050  *
3051  * \return Status error code.
3052  *
3053  * Create a connection to the specified peer address with the specified connection parameters.
3054  * This function is only when operating in master role.
3055  */
3056 /*************************************************************************************************/
3057 uint8_t LlExtCreateConn(const LlExtInitParam_t *pInitParam, const LlExtInitScanParam_t scanParam[], const LlConnSpec_t connSpec[]);
3058 
3059 /*************************************************************************************************/
3060 /*!
3061  * \brief Cancel a create connection operation.
3062  *
3063  * \return None.
3064  *
3065  * Cancel a connection before it is established. This function is only used when operating
3066  * in master role.
3067  */
3068 /*************************************************************************************************/
3069 void LlCreateConnCancel(void);
3070 
3071 /*! \} */ /* LL_API_CENTRAL */
3072 
3073 /*! \addtogroup LL_API_ENCRYPT
3074  * \{ */
3075 
3076 /*************************************************************************************************/
3077 /*!
3078  * \brief Encrypt data.
3079  *
3080  * \param pKey Encryption key.
3081  * \param pData 16 bytes of plain text data.
3082  *
3083  * \return Status error code.
3084  *
3085  * Request the LL to encryption a block of data in place.
3086  */
3087 /*************************************************************************************************/
3088 uint8_t LlEncrypt(uint8_t *pKey, uint8_t *pData);
3089 
3090 /*************************************************************************************************/
3091 /*!
3092  * \brief Start encryption.
3093  *
3094  * \param handle Connection handle.
3095  * \param pRand Pointer to the random number.
3096  * \param diversifier Diversifier value.
3097  * \param pKey Pointer to the encryption key.
3098  *
3099  * \return Status error code.
3100  *
3101  * Start or restart link layer encryption on a connection. This function is only used when
3102  * operating in master role.
3103  */
3104 /*************************************************************************************************/
3105 uint8_t LlStartEncryption(uint16_t handle, const uint8_t *pRand, uint16_t diversifier, const uint8_t *pKey);
3106 
3107 /*************************************************************************************************/
3108 /*!
3109  * \brief Reply to a LTK request.
3110  *
3111  * \param handle Connection handle.
3112  * \param pKey Pointer to new key.
3113  *
3114  * \return Status error code.
3115  *
3116  * Provide the requested LTK encryption key. This function is only used when operating in
3117  * slave mode.
3118  */
3119 /*************************************************************************************************/
3120 uint8_t LlLtkReqReply(uint16_t handle, const uint8_t *pKey);
3121 
3122 /*************************************************************************************************/
3123 /*!
3124  * \brief Negative reply to a LTK request.
3125  *
3126  * \param handle Connection handle.
3127  *
3128  * \return Status error code.
3129  *
3130  * Requested LTK encryption key not available. This function is only used when operating in
3131  * slave mode.
3132  */
3133 /*************************************************************************************************/
3134 uint8_t LlLtkReqNegReply(uint16_t handle);
3135 
3136 /*************************************************************************************************/
3137 /*!
3138  * \brief Read authenticated payload timeout value.
3139  *
3140  * \param handle Connection handle.
3141  * \param pTimeout Pointer to timeout value.
3142  *
3143  * \return Status error code.
3144  *
3145  * Read authenticated payload timeout value for the given handle.
3146  */
3147 /*************************************************************************************************/
3148 uint8_t LlReadAuthPayloadTimeout(uint16_t handle, uint16_t *pTimeout);
3149 
3150 /*************************************************************************************************/
3151 /*!
3152  * \brief Write authenticated payload timeout value.
3153  *
3154  * \param handle Connection handle.
3155  * \param timeout New timeout value.
3156  *
3157  * \return Status error code.
3158  *
3159  * Write new authenticated payload timeout value for the given handle.
3160  */
3161 /*************************************************************************************************/
3162 uint8_t LlWriteAuthPayloadTimeout(uint16_t handle, uint16_t timeout);
3163 
3164 /*************************************************************************************************/
3165 /*!
3166  * \brief Get encryption mode used in a connection.
3167  *
3168  * \param handle Connection handle.
3169  * \param pMode Storage for encryption mode.
3170  *
3171  * \return Status error code.
3172  *
3173  * Get the encryption mode used by a connection.
3174  */
3175 /*************************************************************************************************/
3176 uint8_t LlGetEncMode(uint16_t handle, LlEncMode_t *pMode);
3177 
3178 /*************************************************************************************************/
3179 /*!
3180  * \brief Set encryption mode used in a connection.
3181  *
3182  * \param handle Connection handle.
3183  * \param pMode New encryption mode.
3184  *
3185  * \return Status error code.
3186  *
3187  * Set the encryption mode used by a connection. Must be called before encryption is started or
3188  * when encryption is paused.
3189  */
3190 /*************************************************************************************************/
3191 uint8_t LlSetEncMode(uint16_t handle, const LlEncMode_t *pMode);
3192 
3193 /*! \} */ /* LL_API_ENCRYPT */
3194 
3195 /*! \addtogroup LL_API_DATA
3196  * \{ */
3197 
3198 /*************************************************************************************************/
3199 /*!
3200  * \brief Get the maximum ACL buffers size.
3201  *
3202  * \return Maximum buffers size in bytes.
3203  */
3204 /*************************************************************************************************/
3205 uint16_t LlGetAclMaxSize(void);
3206 
3207 /*************************************************************************************************/
3208 /*!
3209  * \brief Get the number of buffers in the LL ACL transmit queue.
3210  *
3211  * \return Number of buffers.
3212  */
3213 /*************************************************************************************************/
3214 uint8_t LlGetAclTxBufs(void);
3215 
3216 /*************************************************************************************************/
3217 /*!
3218  * \brief Get the number of buffers in the LL ACL receive queue.
3219  *
3220  * \return Number of buffers.
3221  */
3222 /*************************************************************************************************/
3223 uint8_t LlGetAclRxBufs(void);
3224 
3225 /*************************************************************************************************/
3226 /*!
3227  * \brief Get the maximum ISO buffers size between host and controller.
3228  *
3229  * \return Maximum buffers size in bytes.
3230  */
3231 /*************************************************************************************************/
3232 uint16_t LlGetIsoMaxBufSize(void);
3233 
3234 /*************************************************************************************************/
3235 /*!
3236  * \brief Get the number of buffers in the LL ISO transmit queue.
3237  *
3238  * \return Number of buffers.
3239  */
3240 /*************************************************************************************************/
3241 uint8_t LlGetIsoTxBufs(void);
3242 
3243 /*************************************************************************************************/
3244 /*!
3245  * \brief Get the number of buffers in the LL ISO receive queue.
3246  *
3247  * \return Number of buffers.
3248  */
3249 /*************************************************************************************************/
3250 uint8_t LlGetIsoRxBufs(void);
3251 
3252 /*************************************************************************************************/
3253 /*!
3254  * \brief Send an ACL data packet.
3255  *
3256  * \param pData Data buffer
3257  *
3258  * \return None.
3259  *
3260  * Send an ACL data packet. pData points to an ACL buffer formatted according to [1]; the host
3261  * must set the connection handle, flags, and length fields in the buffer.
3262  */
3263 /*************************************************************************************************/
3264 void LlSendAclData(uint8_t *pData);
3265 
3266 /*************************************************************************************************/
3267 /*!
3268  * \brief Receive an ACL data packet
3269  *
3270  * \return Data buffer.
3271  *
3272  * Receive an ACL data packet. This function returns a pointer to an ACL buffer formatted
3273  * according to [1]. The host must parse the header to determine the connection handle, flags,
3274  * and length fields. If no ACL buffers are available this function returns NULL.
3275  *
3276  * The host must deallocate the buffer by calling WsfMsgFree() and call LlRecvBufCmpl() to
3277  * update LL accounting.
3278  */
3279 /*************************************************************************************************/
3280 uint8_t *LlRecvAclData(void);
3281 
3282 /*************************************************************************************************/
3283 /*!
3284  * \brief Indicate that received ACL data buffer has been deallocated
3285  *
3286  * \param numBufs Number of completed packets.
3287  *
3288  * \return None.
3289  *
3290  * Indicate that received ACL data buffer has been deallocated.
3291  */
3292 /*************************************************************************************************/
3293 void LlRecvAclDataComplete(uint8_t numBufs);
3294 
3295 /*! \} */ /* LL_API_DATA */
3296 
3297 /*! \addtogroup LL_API_TEST
3298  * \{ */
3299 
3300 /*************************************************************************************************/
3301 /*!
3302  * \brief Enter transmit test mode.
3303  *
3304  * \param rfChan RF channel number, i.e. "rfChan = (F - 2402) / 2)".
3305  * \param len Length of test data.
3306  * \param pktType Test packet payload type.
3307  * \param numPkt Auto terminate after number of packets, 0 for infinite.
3308  *
3309  * \return Status error code.
3310  *
3311  * Start the transmit test mode on the given channel.
3312  */
3313 /*************************************************************************************************/
3314 uint8_t LlTxTest(uint8_t rfChan, uint8_t len, uint8_t pktType, uint16_t numPkt);
3315 
3316 /*************************************************************************************************/
3317 /*!
3318  * \brief Enter receive test mode.
3319  *
3320  * \param rfChan RF channel number, i.e. "rfChan = (F - 2402) / 2)".
3321  * \param numPkt Auto terminate after number of successful packets, 0 for infinite.
3322  *
3323  * \return Status error code.
3324  *
3325  * Start the receive test mode on the given channel.
3326  */
3327 /*************************************************************************************************/
3328 uint8_t LlRxTest(uint8_t rfChan, uint16_t numPkt);
3329 
3330 /*************************************************************************************************/
3331 /*!
3332  * \brief Enter enhanced transmit test mode.
3333  *
3334  * \param rfChan RF channel number, i.e. "rfChan = (F - 2402) / 2)".
3335  * \param len Length of test data.
3336  * \param pktType Test packet payload type.
3337  * \param phy Transmitter PHY.
3338  * \param numPkt Auto terminate after number of packets, 0 for infinite.
3339  *
3340  * \return Status error code.
3341  *
3342  * Start the transmit test mode on the given channel.
3343  */
3344 /*************************************************************************************************/
3345 uint8_t LlEnhancedTxTest(uint8_t rfChan, uint8_t len, uint8_t pktType, uint8_t phy, uint16_t numPkt);
3346 
3347 /*************************************************************************************************/
3348 /*!
3349  * \brief Enter enhanced receive test mode.
3350  *
3351  * \param rfChan RF channel number, i.e. "rfChan = (F - 2402) / 2)".
3352  * \param phy Receiver PHY.
3353  * \param modIdx Modulation index.
3354  * \param numPkt Auto terminate after number of successful packets, 0 for infinite.
3355  *
3356  * \return Status error code.
3357  *
3358  * Start the receive test mode on the given channel.
3359  */
3360 /*************************************************************************************************/
3361 uint8_t LlEnhancedRxTest(uint8_t rfChan, uint8_t phy, uint8_t modIdx, uint16_t numPkt);
3362 
3363 /*************************************************************************************************/
3364 /*!
3365  * \brief End test mode.
3366  *
3367  * \param pRpt Report return buffer.
3368  *
3369  * \return Status error code.
3370  *
3371  * End test mode and return the report.
3372  */
3373 /*************************************************************************************************/
3374 uint8_t LlEndTest(LlTestReport_t *pRpt);
3375 
3376 /*************************************************************************************************/
3377 /*!
3378  * \brief Set pattern of errors for Tx test mode.
3379  *
3380  * \param pattern Error pattern (1s = no error; 0s = CRC failure).
3381  *
3382  * \return Status error code.
3383  *
3384  * Set pattern of errors for Tx test mode.
3385  *
3386  * \note The error pattern must be set after the Tx test is started.
3387  */
3388 /*************************************************************************************************/
3389 uint8_t LlSetTxTestErrorPattern(uint32_t pattern);
3390 
3391 /*************************************************************************************************/
3392 /*!
3393  * \brief Modify the sleep clock accuracy.
3394  *
3395  * \param action Increase or decrease the sleep clock accuracy.
3396  *
3397  * \return Status error code.
3398  */
3399 /*************************************************************************************************/
3400 uint8_t LlModifySleepClockAccuracy(uint8_t action);
3401 
3402 /*! \} */ /* LL_API_TEST */
3403 
3404 /*! \addtogroup LL_API_DIAG
3405  * \{ */
3406 
3407 /*************************************************************************************************/
3408 /*!
3409  * \brief Get advertising set context size.
3410  *
3411  * \param pMaxAdvSets Buffer to return the maximum number of advertising sets.
3412  * \param pAdvSetCtxSize Buffer to return the size in bytes of the advertising set context.
3413  *
3414  * Return the advertising set context sizes.
3415  */
3416 /*************************************************************************************************/
3417 void LlGetAdvSetContextSize(uint8_t *pMaxAdvSets, uint16_t *pAdvSetCtxSize);
3418 
3419 /*************************************************************************************************/
3420 /*!
3421  * \brief Get connection context size.
3422  *
3423  * \param pMaxConn Buffer to return the maximum number of connections.
3424  * \param pConnCtxSize Buffer to return the size in bytes of the connection context.
3425  *
3426  * Return the connection context sizes.
3427  */
3428 /*************************************************************************************************/
3429 void LlGetConnContextSize(uint8_t *pMaxConn, uint16_t *pConnCtxSize);
3430 
3431 /*************************************************************************************************/
3432 /*!
3433  * \brief Get extended scan context size.
3434  *
3435  * \param pMaxExtScan Buffer to return the maximum number of extended scanners.
3436  * \param pExtScanCtxSize Buffer to return the size in bytes of the extended scanner context.
3437  *
3438  * Return the advertising set context sizes.
3439  */
3440 /*************************************************************************************************/
3441 void LlGetExtScanContextSize(uint8_t *pMaxExtScan, uint16_t *pExtScanCtxSize);
3442 
3443 /*************************************************************************************************/
3444 /*!
3445  * \brief Get extended initiator context size.
3446  *
3447  * \param pMaxExtInit Buffer to return the maximum number of extended initiators.
3448  * \param pExtInitCtxSize Buffer to return the size in bytes of the extended initiator context.
3449  *
3450  * Return the advertising set context sizes.
3451  */
3452 /*************************************************************************************************/
3453 void LlGetExtInitContextSize(uint8_t *pMaxExtInit, uint16_t *pExtInitCtxSize);
3454 
3455 /*************************************************************************************************/
3456 /*!
3457  * \brief Get periodic scan context size.
3458  *
3459  * \param pMaxPerScan Buffer to return the maximum number of periodic scanners.
3460  * \param pPerScanCtxSize Buffer to return the size in bytes of the periodic scanner context.
3461  *
3462  * Return the advertising set context sizes.
3463  */
3464 /*************************************************************************************************/
3465 void LlGetPerScanContextSize(uint8_t *pMaxPerScan, uint16_t *pPerScanCtxSize);
3466 
3467 /*************************************************************************************************/
3468 /*!
3469  * \brief Get CIG context size.
3470  *
3471  * \param pMaxCig Buffer to return the maximum number of CIG.
3472  * \param pCigCtxSize Buffer to return the size in bytes of the CIG context.
3473  *
3474  * Return the connection context sizes.
3475  */
3476 /*************************************************************************************************/
3477 void LlGetCigContextSize(uint8_t *pMaxCig, uint16_t *pCigCtxSize);
3478 
3479 /*************************************************************************************************/
3480 /*!
3481  * \brief Get CIS context size.
3482  *
3483  * \param pMaxCis Buffer to return the maximum number of CIS.
3484  * \param pCisCtxSize Buffer to return the size in bytes of the CIS context.
3485  *
3486  * Return the connection context sizes.
3487  */
3488 /*************************************************************************************************/
3489 void LlGetCisContextSize(uint8_t *pMaxCis, uint16_t *pCisCtxSize);
3490 
3491 /*************************************************************************************************/
3492 /*!
3493  * \brief Get the LL handler watermark level.
3494  *
3495  * \return Watermark level in microseconds.
3496  */
3497 /*************************************************************************************************/
3498 uint16_t LlStatsGetHandlerWatermarkUsec(void);
3499 
3500 /*! \} */ /* LL_API_DIAG */
3501 
3502 
3503 /*! \addtogroup LL_API_CIS
3504  * \{ */
3505 
3506 /*************************************************************************************************/
3507 /*!
3508  * \brief Used by a master host to set the parameters of all connected isochronous streams
3509  * associated with a connected isochronous group in the controller.
3510  *
3511  * \param pSetCigParam CIG parameters.
3512  * \param pCisHandles Return buffer for the connected isochronous stream handles.
3513  *
3514  * \return Status error code.
3515  */
3516 /*************************************************************************************************/
3517 uint8_t LlSetCigParams(LlCisCigParams_t *pSetCigParam, uint16_t *pCisHandles);
3518 
3519 /*************************************************************************************************/
3520 /*!
3521  * \brief Used by a master Host to set the parameters of all connected isochronous streams
3522  * associated with a connected isochronous group in the controller for testing purpose.
3523  *
3524  * \param pSetCigParamTest CIG test parameters.
3525  * \param pCisHandles Return buffer for the connected isochronous stream handles.
3526  *
3527  * \return Status error code.
3528  */
3529 /*************************************************************************************************/
3530 uint8_t LlSetCigParamsTest(LlCisCigParamsTest_t *pSetCigParamTest, uint16_t *pCisHandles);
3531 
3532 /*************************************************************************************************/
3533 /*!
3534  * \brief Used by the master host to establish one or more connected isochronous streams.
3535  *
3536  * \param numCis Number of connected isochronous streams.
3537  * \param pCreateCisParam Parameters for create connected isochronous stream.
3538  *
3539  * \return Status error code.
3540  */
3541 /*************************************************************************************************/
3542 uint8_t LlCreateCis(uint8_t numCis, LlCisCreateCisParams_t *pCreateCisParam);
3543 
3544 /*************************************************************************************************/
3545 /*!
3546  * \brief Removes all the connected isochronous streams which have previously been set up.
3547  *
3548  * \param cigId Identifier of the connected isochronous group.
3549  *
3550  * \return Status error code.
3551  */
3552 /*************************************************************************************************/
3553 uint8_t LlRemoveCig(uint8_t cigId);
3554 
3555 /*************************************************************************************************/
3556 /*!
3557  * \brief Used by the slave host to inform the controller to accept the request for the
3558  * connected isochronous stream.
3559  *
3560  * \param cisHandle Handle of the connected isochronous stream.
3561  *
3562  * \return Status error code.
3563  */
3564 /*************************************************************************************************/
3565 uint8_t LlAcceptCisReq(uint16_t cisHandle);
3566 
3567 /*************************************************************************************************/
3568 /*!
3569  * \brief Used by the slave host to inform the controller to reject the request for the
3570  * connected isochronous stream.
3571  *
3572  * \param cisHandle Handle of the connected isochronous stream.
3573  * \param reason Indicate the reason for rejecting the request.
3574  *
3575  * \return Status error code.
3576  */
3577 /*************************************************************************************************/
3578 uint8_t LlRejectCisReq(uint16_t cisHandle, uint8_t reason);
3579 
3580 /*************************************************************************************************/
3581 /*!
3582  * \brief Used to identify and enable the isochronous data path between the host and the
3583  * controller for each connected isochronous stream or broadcast isochronous stream.
3584  *
3585  * \param pSetupDataPathParam Parameters for setup ISO data path.
3586  *
3587  * \return Status error code.
3588  */
3589 /*************************************************************************************************/
3590 uint8_t LlSetupIsoDataPath(LlIsoSetupDataPathParams_t *pSetupDataPathParam);
3591 
3592 /*************************************************************************************************/
3593 /*!
3594  * \brief Used to remove the isochronous data path associated with the
3595  * connected isochronous stream or broadcast isochronous stream.
3596  *
3597  * \param isoHandle Handle for CIS or BIS.
3598  *
3599  * \return Status error code.
3600  */
3601 /*************************************************************************************************/
3602 uint8_t LlRemoveIsoDataPath(uint16_t isoHandle);
3603 
3604 /*************************************************************************************************/
3605 /*!
3606  * \brief Initialize LL subsystem for operation for slave connected isochronous stream.
3607  *
3608  * \return None.
3609  *
3610  * This function initializes the LL subsystem for use as a slave connected isochronous stream.
3611  */
3612 /*************************************************************************************************/
3613 void LlCisSlaveInit(void);
3614 
3615 /*************************************************************************************************/
3616 /*!
3617  * \brief Initialize LL subsystem for operation for master connected isochronous stream.
3618  *
3619  * \return None.
3620  *
3621  * This function initializes the LL subsystem for use as a master connected isochronous stream.
3622  */
3623 /*************************************************************************************************/
3624 void LlCisMasterInit(void);
3625 
3626 /*************************************************************************************************/
3627 /*!
3628  * \brief Initialize memory for CIS.
3629  *
3630  * \param pFreeMem Pointer to free memory.
3631  * \param freeMemSize Size of pFreeMem.
3632  *
3633  * \return Amount of free memory consumed.
3634  *
3635  * This function allocates memory for CIS.
3636  *
3637  * \note This routine must be called after LlInitRunTimeCfg() but only once before any
3638  * other initialization routines.
3639  */
3640 /*************************************************************************************************/
3641 uint16_t LlInitCisMem(uint8_t *pFreeMem, uint32_t freeMemSize);
3642 
3643 /*************************************************************************************************/
3644 /*!
3645  * \brief Initialize memory for ISO.
3646  *
3647  * \param pFreeMem Pointer to free memory.
3648  * \param freeMemSize Size of pFreeMem.
3649  *
3650  * \return Amount of free memory consumed.
3651  *
3652  * This function allocates memory for CIS.
3653  *
3654  * \note This routine must be called after LlInitRunTimeCfg() but only once before any
3655  * other initialization routines.
3656  */
3657 /*************************************************************************************************/
3658 uint16_t LlInitIsoMem(uint8_t *pFreeMem, uint32_t freeMemSize);
3659 
3660 /*************************************************************************************************/
3661 /*!
3662  * \brief Send an ISO data packet.
3663  *
3664  * \param pData Data buffer
3665  *
3666  * \return None.
3667  *
3668  * Send an ISO data packet. pData points to an ISO buffer formatted according to [1]; the host
3669  * must set the connection handle, flags, and length fields in the buffer.
3670  */
3671 /*************************************************************************************************/
3672 void LlSendIsoData(uint8_t *pData);
3673 
3674 /*************************************************************************************************/
3675 /*!
3676  * \brief Receive an ISO data packet
3677  *
3678  * \return Data buffer.
3679  *
3680  * Receive an ISO data packet. This function returns a pointer to an ISO buffer formatted
3681  * according to [1]. The host must parse the header to determine the connection handle, flags,
3682  * and length fields. If no ISO buffers are available this function returns NULL.
3683  *
3684  * The host must deallocate the buffer by calling WsfMsgFree() and call LlRecvBufCmpl() to
3685  * update LL accounting.
3686  */
3687 /*************************************************************************************************/
3688 uint8_t *LlRecvIsoData(void);
3689 
3690 /*************************************************************************************************/
3691 /*!
3692  * \brief Indicate that received ISO data buffer has been deallocated
3693  *
3694  * \param numBufs Number of completed packets.
3695  *
3696  * \return None.
3697  *
3698  * Indicate that received ISO data buffer has been deallocated.
3699  */
3700 /*************************************************************************************************/
3701 void LlRecvIsoDataComplete(uint8_t numBufs);
3702 
3703 /*************************************************************************************************/
3704 /*!
3705  * \brief Enable ISO Tx test.
3706  *
3707  * \param isoHandle CIS or BIS handle.
3708  * \param plLen Payload length type.
3709  *
3710  * \return Status error code.
3711  *
3712  */
3713 /*************************************************************************************************/
3714 uint8_t LlIsoTxTest(uint16_t isoHandle, uint8_t plLen);
3715 
3716 /*************************************************************************************************/
3717 /*!
3718  * \brief Enable ISO Rx test.
3719  *
3720  * \param isoHandle CIS or BIS handle.
3721  * \param plLen Payload length type.
3722  *
3723  * \return Status error code.
3724  *
3725  */
3726 /*************************************************************************************************/
3727 uint8_t LlIsoRxTest(uint16_t isoHandle, uint8_t plLen);
3728 
3729 /*************************************************************************************************/
3730 /*!
3731  * \brief ISO read test counter.
3732  *
3733  * \param isoHandle CIS or BIS handle.
3734  * \param pRcvedPlCounter Pointer to the received payload counter as return parameter.
3735  * \param pMissedPlCounter Pointer to the missed payload counter as return parameter.
3736  * \param pFailedPlCounter Pointer to the failed payload counter as return parameter.
3737  * \param termTest TRUE if terminate the test, FALSE otherwise.
3738  *
3739  * \return Status error code.
3740  *
3741  */
3742 /*************************************************************************************************/
3743 uint8_t LlIsoReadTestCounter(uint16_t isoHandle, uint32_t *pRcvedPlCounter, uint32_t *pMissedPlCounter, uint32_t *pFailedPlCounter, bool_t termTest);
3744 
3745 /*! \} */ /* LL_API_CIS */
3746 
3747 #ifdef __cplusplus
3748 };
3749 #endif
3750 
3751 #endif /* LL_API_H */
LlDataLenChangeInd_t dataLenChangeInd
Definition: ll_api.h:1210
wsfMsgHdr_t hdr
Definition: ll_api.h:1160
uint8_t LlGetAdvTxPower(int8_t *pAdvTxPwr)
Get advertising transmit power.
uint8_t rteMToS
Definition: ll_api.h:637
uint16_t perAdvProp
Definition: ll_api.h:381
void LlExtScanEnable(uint8_t enable, uint8_t filterDup, uint16_t duration, uint16_t period)
Extended scan enable.
uint16_t scanWindow
Definition: ll_api.h:558
uint8_t LlSetChannelMap(uint16_t handle, const uint8_t *pChanMap)
Set connection&#39;s channel map.
uint8_t LlSetResolvablePrivateAddrTimeout(uint16_t rpaTimeout)
Set resolvable private address timeout.
LlPerAdvSyncLostInd_t perAdvSyncLostInd
Definition: ll_api.h:1225
wsfMsgHdr_t hdr
Definition: ll_api.h:914
uint8_t * pAdvAddr
Definition: ll_api.h:482
void LlConnMasterInit(void)
Initialize LL subsystem for operation as a connectable master.
uint8_t LlAddDeviceToWhitelist(uint8_t addrType, bdAddr_t pAddr)
Add device to the white list.
int8_t defTxPwrLvl
Definition: ll_api.h:141
wsfMsgHdr_t hdr
Definition: ll_api.h:854
uint8_t rxPhy
Definition: ll_api.h:995
uint8_t LlSetOpFlags(uint32_t flags, bool_t enable)
Set operational mode flags.
uint8_t status
Definition: ll_api.h:1107
uint16_t connInterval
Definition: ll_api.h:842
uint16_t connLatency
Definition: ll_api.h:878
uint8_t LlRemoveDeviceFromResolvingList(uint8_t peerAddrType, const uint8_t *pPeerIdentityAddr)
Remove device from resolving list.
uint8_t LlAddDeviceToPeriodicAdvList(const LlDevicePerAdvList_t *pParam)
Add device to periodic advertiser list.
uint8_t txPhy
Definition: ll_api.h:994
uint8_t directAddrType
Definition: ll_api.h:1090
uint16_t transLatMToS
Definition: ll_api.h:635
uint8_t LlRemoveIsoDataPath(uint16_t isoHandle)
Used to remove the isochronous data path associated with the connected isochronous stream or broadcas...
LlConnUpdateInd_t connUpdateInd
Definition: ll_api.h:1198
uint16_t scanWindow
Definition: ll_api.h:451
uint32_t cisSyncDelayUsec
Definition: ll_api.h:1038
wsfMsgHdr_t hdr
Definition: ll_api.h:1001
uint8_t directAddrType
Definition: ll_api.h:829
uint16_t maxIsoBufLen
Definition: ll_api.h:146
uint8_t LlSetConnOpFlags(uint16_t handle, uint32_t flags, bool_t enable)
Set connection&#39;s operational mode flags.
void LlEncConnSlaveInit(void)
Initialize LL subsystem for operation as a encryptable connectable slave.
uint8_t addrType
Definition: ll_api.h:826
wsfMsgHdr_t hdr
Definition: ll_api.h:1046
void LlEvtRegister(llEvtCback_t evtCback)
Register LL event handler.
void LlTestInit(void)
Initialize LL subsystem for test modes.
Extended advertising enable.
Definition: ll_api.h:1015
CIG test CIG parameters.
Definition: ll_api.h:670
LlScanReportInd_t scanReportInd
Definition: ll_api.h:1213
uint8_t LlSetExtScanParam(uint8_t ownAddrType, uint8_t scanFiltPolicy, uint8_t scanPhys, const LlExtScanParam_t param[])
Set extended scanning parameters.
void LlGetExtInitContextSize(uint8_t *pMaxExtInit, uint16_t *pExtInitCtxSize)
Get extended initiator context size.
uint16_t handle
Definition: ll_api.h:942
Initiating parameters (LlExtCreateConn()).
Definition: ll_api.h:566
uint32_t cigSyncDelayUsec
Definition: ll_api.h:1037
Create connection cancel confirm.
Definition: ll_api.h:883
wsfMsgHdr_t hdr
Definition: ll_api.h:836
LlExtScanEnableCnf_t extScanEnableCnf
Definition: ll_api.h:1217
uint8_t clockAccuracy
Definition: ll_api.h:845
uint32_t priAdvInterMin
Definition: ll_api.h:353
uint8_t LlClearPeriodicAdvList(void)
Clear all devices in periodic advertiser list command.
uint16_t supTimeout
Definition: ll_api.h:868
uint8_t eventType
Definition: ll_api.h:825
const uint8_t * pPeerAddr
Definition: ll_api.h:562
uint16_t eventType
Definition: ll_api.h:1081
uint16_t * pCisHandle
Definition: ll_api.h:683
LlGenerateDhKeyInd_t generateDhKeyInd
Definition: ll_api.h:1212
uint8_t LlReadResolvingListSize(uint8_t *pSize)
Read resolving list size.
uint8_t ownAddrType
Definition: ll_api.h:569
uint8_t LlReadMaxAdvDataLen(uint16_t *pLen)
Read maximum advertising data length.
Advertising set terminated.
Definition: ll_api.h:1104
uint8_t LlRemoveDeviceFromPeriodicAdvList(const LlDevicePerAdvList_t *pParam)
Remove device from periodic advertiser list command.
uint8_t status
Definition: ll_api.h:1035
uint8_t LlStartEncryption(uint16_t handle, const uint8_t *pRand, uint16_t diversifier, const uint8_t *pKey)
Start encryption.
uint8_t LlGetAclTxBufs(void)
Get the number of buffers in the LL ACL transmit queue.
uint16_t LlInitExtAdvMem(uint8_t *pFreeMem, uint32_t freeMemSize)
Initialize memory for extended advertising.
uint16_t perAdvInterMax
Definition: ll_api.h:380
Encryption mode data structure used in LlGetEncMode() and LlSetEncMode().
Definition: ll_api.h:712
uint8_t peerAddrType
Definition: ll_api.h:1009
uint8_t LlSetPrivacyMode(uint8_t peerAddrType, const uint8_t *pPeerIdentityAddr, uint8_t privMode)
Set privacy mode.
void(* llAclCback_t)(uint16_t handle, uint8_t numBufs)
ACL callback.
Definition: ll_api.h:1238
uint8_t LlSetExtAdvTxPhyOptions(uint8_t handle, uint8_t priPhyOpts, uint8_t secPhyOpts)
Set extended advertising transmit PHY options.
int8_t advTxPwr
Definition: ll_api.h:360
void LlIsoRegister(llIsoCback_t sendCompCback, llIsoCback_t recvPendCback)
Register ISO handler.
uint8_t maxCis
Definition: ll_api.h:151
uint16_t connHandle
Definition: ll_api.h:1109
void LlGetAdvSetContextSize(uint8_t *pMaxAdvSets, uint16_t *pAdvSetCtxSize)
Get advertising set context size.
wsfMsgHdr_t hdr
Definition: ll_api.h:1008
uint8_t LlRxTest(uint8_t rfChan, uint16_t numPkt)
Enter receive test mode.
bool_t stableModIdxRxSup
Definition: ll_api.h:159
uint8_t cisId
Definition: ll_api.h:630
uint8_t LlPeriodicAdvCreateSync(const LlPerAdvCreateSyncCmd_t *pParam)
Create synchronization of periodic advertising.
LlRemConnParamInd_t remConnParamInd
Definition: ll_api.h:1208
uint16_t supTimeout
Definition: ll_api.h:588
uint8_t LlPeriodicAdvCreateSyncCancel(void)
Cancel pending synchronization of periodic advertising.
uint8_t LlEndTest(LlTestReport_t *pRpt)
End test mode.
const uint8_t * pPeerAddr
Definition: ll_api.h:571
wsfMsgHdr_t hdr
Definition: ll_api.h:983
wsfMsgHdr_t hdr
Definition: ll_api.h:874
Scan report.
Definition: ll_api.h:1006
uint8_t LlSetAdvData(uint8_t len, const uint8_t *pData)
Set advertising data.
uint16_t maxTxLen
Definition: ll_api.h:965
uint16_t connLatency
Definition: ll_api.h:867
uint8_t peerSca
Definition: ll_api.h:1186
uint16_t handle
Definition: ll_api.h:925
void LlGetConnContextSize(uint8_t *pMaxConn, uint16_t *pConnCtxSize)
Get connection context size.
void LlGetCigContextSize(uint8_t *pMaxCig, uint16_t *pCigCtxSize)
Get CIG context size.
Authentication payload timeout expired indication.
Definition: ll_api.h:954
uint8_t secAdvMaxSkip
Definition: ll_api.h:362
uint16_t maxRxLen
Definition: ll_api.h:967
LlReadLocalP256PubKeyInd_t readLocalP256PubKeyInd
Definition: ll_api.h:1211
void LlReadMaximumDataLen(uint16_t *pMaxTxLen, uint16_t *pMaxTxTime, uint16_t *pMaxRxLen, uint16_t *pMaxRxTime)
Read maximum data length.
uint16_t handle
Definition: ll_api.h:1126
uint8_t LlReadPhy(uint16_t handle, uint8_t *pTxPhy, uint8_t *pRxPhy)
Read current transmitter PHY and receive PHY.
LlCisEstInd_t cisEst
Definition: ll_api.h:1229
Initiating scan parameters (LlExtCreateConn()).
Definition: ll_api.h:576
uint8_t status
Definition: ll_api.h:864
uint8_t priAdvChanMap
Definition: ll_api.h:355
uint8_t LlSetScanRespData(uint8_t len, const uint8_t *pData)
Set scan response data.
uint16_t maxTxTime
Definition: ll_api.h:966
Initiating parameters (LlExtCreateConn()).
Definition: ll_api.h:555
uint16_t maxExtAdvDataLen
Definition: ll_api.h:129
Encryption change indication.
Definition: ll_api.h:912
wsfMsgHdr_t hdr
Definition: ll_api.h:948
uint8_t LlEncrypt(uint8_t *pKey, uint8_t *pData)
Encrypt data.
uint16_t cisHandle
Definition: ll_api.h:1048
void LlSetAdvTxPower(int8_t advTxPwr)
Set advertising transmit power.
bdAddr_t peerAddr
Definition: ll_api.h:841
void LlSendIsoData(uint8_t *pData)
Send an ISO data packet.
Read local P-256 key pair complete.
Definition: ll_api.h:972
wsfMsgHdr_t hdr
Definition: ll_api.h:885
uint8_t LlSetDefaultPhy(uint8_t allPhys, uint8_t txPhys, uint8_t rxPhys)
Set default PHYs.
uint16_t connIntervalMax
Definition: ll_api.h:586
CIS established event.
Definition: ll_api.h:1032
LlReadRemoteVerInfoCnf_t readRemoteVerInfoCnf
Definition: ll_api.h:1200
CIS request event.
Definition: ll_api.h:1044
wsfMsgHdr_t hdr
Definition: ll_api.h:1034
uint8_t maxScanReqRcvdEvt
Definition: ll_api.h:134
Used channel selection indication.
Definition: ll_api.h:1123
Connect indication.
Definition: ll_api.h:834
void LlAclRegister(llAclCback_t sendCompCback, llAclCback_t recvPendCback)
Register ACL handler.
uint64_t peerRpa
Definition: ll_api.h:1011
uint16_t handle
Definition: ll_api.h:865
uint16_t sduSizeMToS
Definition: ll_api.h:631
uint16_t LlGetAclMaxSize(void)
Get the maximum ACL buffers size.
uint8_t LlGenerateDhKey(const uint8_t pubKey_x[LL_ECC_KEY_LEN], const uint8_t pubKey_y[LL_ECC_KEY_LEN])
Generate a Diffie-Hellman key.
wsfMsgHdr_t hdr
Definition: ll_api.h:1147
uint8_t scanAddrType
Definition: ll_api.h:1118
uint8_t * LlRecvAclData(void)
Receive an ACL data packet.
uint8_t numIsoTxBuf
Definition: ll_api.h:144
uint8_t cigId
Definition: ll_api.h:1049
uint8_t LlRemoveCig(uint8_t cigId)
Removes all the connected isochronous streams which have previously been set up.
uint16_t implRev
Definition: ll_api.h:123
void LlGetSupStates(uint8_t *pStates)
Get supported states.
uint8_t peerAddrType
Definition: ll_api.h:357
uint16_t handle
Definition: ll_api.h:932
LlExtAdvEnableCnf_t extAdvEnableCnf
Definition: ll_api.h:1219
Read remote feature confirm.
Definition: ll_api.h:903
uint8_t ownAddrType
Definition: ll_api.h:443
void LlGetFeatures(uint8_t *pFeatures)
Get features.
void LlRecvAclDataComplete(uint8_t numBufs)
Indicate that received ACL data buffer has been deallocated.
uint8_t LlGetWhitelistSize(void)
Get white list size.
void LlExtInitMasterInit(void)
Initialize LL subsystem for operation as an extended initiating master.
LTK request negative reply.
Definition: ll_api.h:946
uint8_t secAdvPhy
Definition: ll_api.h:363
wsfMsgHdr_t hdr
Definition: ll_api.h:1106
uint16_t scanInterval
Definition: ll_api.h:557
uint16_t connIntervalMax
Definition: ll_api.h:877
uint8_t LlSetValidatePublicKeyMode(uint8_t validateMode)
Set validate public key mode.
uint8_t * pData
Definition: ll_api.h:822
uint8_t LlPeriodicAdvSetInfoTransfer(uint16_t connHandle, uint16_t serviceData, uint8_t advHandle)
Send sync info about periodic adv in an advertising set to a connected device.
uint16_t supTimeout
Definition: ll_api.h:844
uint16_t LlInitIsoMem(uint8_t *pFreeMem, uint32_t freeMemSize)
Initialize memory for ISO.
uint8_t LlSetP256PrivateKey(const uint8_t privKey[LL_ECC_KEY_LEN])
Set P-256 private key for debug purposes.
uint8_t LlSetAddrResolutionEnable(uint8_t enable)
Enable or disable address resolution.
void LlReadSupTxPower(int8_t *pMinTxPwr, int8_t *pMaxTxPwr)
Read supported transmit power.
uint16_t scanInterval
Definition: ll_api.h:578
uint8_t LlSetupIsoDataPath(LlIsoSetupDataPathParams_t *pSetupDataPathParam)
Used to identify and enable the isochronous data path between the host and the controller for each co...
uint16_t dtmRxSyncMs
Definition: ll_api.h:154
void LlGetCisContextSize(uint8_t *pMaxCis, uint16_t *pCisCtxSize)
Get CIS context size.
bdAddr_t scanAddr
Definition: ll_api.h:1119
void LlSetBdAddr(const uint8_t *pAddr)
Set Bluetooth device address.
uint16_t syncHandle
Definition: ll_api.h:1161
uint8_t LlRemoteConnParamReqReply(uint16_t handle, const LlConnSpec_t *pConnSpec)
Remote connection parameter request reply.
uint8_t LlSetLocalMinUsedChan(uint8_t phys, int8_t pwrThres, uint8_t minUsedCh)
Set local minimum number of used channels.
uint8_t numCmplAdvEvt
Definition: ll_api.h:1110
Scan parameters.
Definition: ll_api.h:438
uint8_t maxAdvReports
Definition: ll_api.h:128
uint8_t btVer
Definition: ll_api.h:124
LlPeerScaCnf_t peerScaCnf
Definition: ll_api.h:1231
void LlPastInit(void)
Initialize LL subsystem for PAST(Periodic advertising sync transfer).
void LlChannelSelection2Init(void)
Initialize LL subsystem for secure connections.
CIG test CIS parameters.
Definition: ll_api.h:655
LlPhyUpdateInd_t phyUpdateInd
Definition: ll_api.h:1215
uint16_t aclHandle
Definition: ll_api.h:1047
uint8_t phyMToS
Definition: ll_api.h:633
LL runtime configuration parameters.
Definition: ll_api.h:119
void LlScanMasterInit(void)
Initialize LL subsystem for operation as a scanning master.
uint8_t framing
Definition: ll_api.h:649
uint8_t cigId
Definition: ll_api.h:644
uint8_t ownAddrType
Definition: ll_api.h:560
uint8_t LlDisconnect(uint16_t handle, uint8_t reason)
Disconnect a connection.
uint8_t LlSetDataLen(uint16_t handle, uint16_t txLen, uint16_t txTime)
Set data length.
wsfMsgHdr_t hdr
Definition: ll_api.h:1133
uint8_t LlRemoveDeviceFromWhitelist(uint8_t addrType, bdAddr_t pAddr)
Remove device from the white list.
uint16_t connHandle
Definition: ll_api.h:1185
bool_t enaAuth
Definition: ll_api.h:714
uint8_t LlClearWhitelist(void)
Clear all white list entries.
uint8_t * pPeerAddr
Definition: ll_api.h:358
uint16_t handle
Definition: ll_api.h:856
uint8_t LlReadAuthPayloadTimeout(uint16_t handle, uint16_t *pTimeout)
Read authenticated payload timeout value.
bool_t nonceMode
Definition: ll_api.h:715
uint8_t LlPeriodicAdvSyncTransfer(uint16_t connHandle, uint16_t serviceData, uint16_t syncHandle)
Send sync info about periodic advertising to a connected device.
uint16_t maxRxTime
Definition: ll_api.h:968
uint8_t len
Definition: ll_api.h:823
Advertising report indication.
Definition: ll_api.h:819
uint8_t LlSetPeriodicAdvParam(uint8_t handle, LlPerAdvParam_t *pPerAdvParam)
Set periodic advertising parameters.
uint16_t maxExtScanDataLen
Definition: ll_api.h:135
uint8_t advClkAccuracy
Definition: ll_api.h:1141
LlExtAdvReportInd_t extAdvReportInd
Definition: ll_api.h:1216
uint8_t LlIsoTxTest(uint16_t isoHandle, uint8_t plLen)
Enable ISO Tx test.
LlHwErrorInd_t hwErrorInd
Definition: ll_api.h:1193
uint8_t LlReadRemoteVerInfo(uint16_t handle)
Read remote version information.
void LlPrivInit(void)
Initialize LL subsystem for operation with privacy.
CIG parameters.
Definition: ll_api.h:642
wsfMsgHdr_t hdr
Definition: ll_api.h:1099
LlAuthPayloadTimeoutInd_t authPayloadTimeoutInd
Definition: ll_api.h:1209
uint8_t status
Definition: ll_api.h:855
uint8_t addrType
Definition: ll_api.h:1082
uint8_t LlCreateConn(const LlInitParam_t *pInitParam, const LlConnSpec_t *pConnSpec)
Create connection.
PHY update complete.
Definition: ll_api.h:989
uint8_t cisId
Definition: ll_api.h:1050
Periodic advertising parameters.
Definition: ll_api.h:377
wsfMsgHdr_t hdr
Definition: ll_api.h:940
uint8_t LlSetCigParams(LlCisCigParams_t *pSetCigParam, uint16_t *pCisHandles)
Used by a master host to set the parameters of all connected isochronous streams associated with a co...
uint16_t minCeLen
Definition: ll_api.h:589
uint16_t syncHandle
Definition: ll_api.h:1148
uint8_t LlAcceptCisReq(uint16_t cisHandle)
Used by the slave host to inform the controller to accept the request for the connected isochronous s...
uint8_t LlIsoReadTestCounter(uint16_t isoHandle, uint32_t *pRcvedPlCounter, uint32_t *pMissedPlCounter, uint32_t *pFailedPlCounter, bool_t termTest)
ISO read test counter.
wsfMsgHdr_t hdr
Definition: ll_api.h:1025
uint8_t filterPolicy
Definition: ll_api.h:559
uint8_t LlGetIsoRxBufs(void)
Get the number of buffers in the LL ISO receive queue.
void LlCisSlaveInit(void)
Initialize LL subsystem for operation for slave connected isochronous stream.
LlCreateConnCancelCnf_t createConnCancelCnf
Definition: ll_api.h:1199
uint8_t maxCig
Definition: ll_api.h:150
uint8_t LlRemoveAdvSet(uint8_t handle)
Remove advertising set.
uint16_t LlInitExtScanMem(uint8_t *pFreeMem, uint32_t freeMemSize)
Initialize memory for extended scanning.
Scan request received.
Definition: ll_api.h:1114
uint16_t connInterval
Definition: ll_api.h:866
LlDisconnectInd_t disconnectInd
Definition: ll_api.h:1197
Test report data.
Definition: ll_api.h:754
uint8_t scanFiltPolicy
Definition: ll_api.h:444
uint8_t LlClearAdvSets(void)
Clear advertising sets.
uint8_t numTxBufs
Definition: ll_api.h:138
LlCisCigCisParamsTest_t * pCisParam
Definition: ll_api.h:677
uint8_t phySToM
Definition: ll_api.h:1040
uint16_t connLatency
Definition: ll_api.h:587
uint32_t _align32
Definition: ll_api.h:125
uint8_t LlSetExtAdvDataFragLen(uint8_t handle, uint8_t fragLen)
Set extended advertising data fragmentation length.
Read remote version information confirm.
Definition: ll_api.h:890
uint8_t LlAddDeviceToResolvingList(uint8_t peerAddrType, const uint8_t *pPeerIdentityAddr, const uint8_t *pPeerIrk, const uint8_t *pLocalIrk)
Add device to resolving list.
uint8_t reason
Definition: ll_api.h:857
LlConnInd_t connInd
Definition: ll_api.h:1196
uint16_t transLatSToM
Definition: ll_api.h:636
LE periodic advertising report.
Definition: ll_api.h:1145
Disconnect indication.
Definition: ll_api.h:852
uint8_t maxConn
Definition: ll_api.h:137
uint8_t LlGetExtAdvTxPowerLevel(uint16_t handle, int8_t *pLevel)
Get extended advertising TX power level.
LlLtkReqNegReplyCnf_t ltkReqNegReplyCnf
Definition: ll_api.h:1205
uint8_t LlSetAdvParam(uint16_t advIntervalMin, uint16_t advIntervalMax, uint8_t advType, uint8_t ownAddrType, uint8_t peerAddrType, const uint8_t *pPeerAddr, uint8_t advChanMap, uint8_t advFiltPolicy)
Set advertising parameter.
uint8_t LlGenerateDhKeyV2(uint8_t pubKey_x[LL_ECC_KEY_LEN], uint8_t pubKey_y[LL_ECC_KEY_LEN], uint8_t keyType)
Generate a Diffie-Hellman key.
LlReadRemoteFeatCnf_t readRemoteFeatCnf
Definition: ll_api.h:1201
uint8_t LlSetPeriodicAdvRcvEnable(uint16_t syncHandle, uint8_t enable)
Enable or disable reports for the periodic advertising sync.
uint8_t scanType
Definition: ll_api.h:442
uint16_t numRxCrcError
Definition: ll_api.h:758
void LlInitRunTimeCfg(const LlRtCfg_t *pCfg)
Initialize runtime configuration.
uint8_t LlGetAclRxBufs(void)
Get the number of buffers in the LL ACL receive queue.
void LlReadRfPathComp(int16_t *pTxPathComp, int16_t *pRxPathComp)
Read RF path compensation.
uint8_t LlSetAuxOffsetDelay(uint8_t handle, uint32_t delayUsec)
Set auxiliary packet offset delay.
void LlPhyMasterInit(void)
Initialize LL subsystem for PHY features (master).
wsfMsgHdr_t hdr
Definition: ll_api.h:991
uint8_t LlGetRandNum(uint8_t *pRandNum)
Get random number.
Extended advertising enable parameters.
Definition: ll_api.h:369
LlPerAdvSyncEstdCnf_t perAdvSyncEstdCnf
Definition: ll_api.h:1223
uint8_t addrType
Definition: ll_api.h:840
uint16_t LlInitCisMem(uint8_t *pFreeMem, uint32_t freeMemSize)
Initialize memory for CIS.
uint16_t numRxTimeout
Definition: ll_api.h:759
const uint8_t * pData
Definition: ll_api.h:1093
uint16_t sduSizeSToM
Definition: ll_api.h:632
Key refresh indication.
Definition: ll_api.h:921
uint8_t LlSetTxPowerLevel(uint16_t handle, int8_t level)
Set connection&#39;s TX power level.
uint8_t LlClearResolvingList(void)
Clear resolving list.
LE periodic advertising sync lost.
Definition: ll_api.h:1158
Union of all event types.
Definition: ll_api.h:1190
uint32_t sduIntervalSToM
Definition: ll_api.h:646
CIS parameters.
Definition: ll_api.h:628
wsfMsgHdr_t hdr
Definition: ll_api.h:1017
Device in periodic advertiser list.
Definition: ll_api.h:488
uint8_t LlGetPeerMinUsedChan(uint16_t handle, uint8_t *pPeerMinUsedChan)
Get peer minimum number of used channels.
void LlAdvEnable(uint8_t enable)
Advertising enable.
uint8_t LlTxTest(uint8_t rfChan, uint8_t len, uint8_t pktType, uint16_t numPkt)
Enter transmit test mode.
uint8_t dataStatus
Definition: ll_api.h:1152
uint8_t numRxBufs
Definition: ll_api.h:139
Connection parameter change indication.
Definition: ll_api.h:872
wsfMsgHdr_t hdr
Definition: ll_api.h:1183
uint8_t LlSetDefaultPeriodicAdvSyncTransParams(uint8_t mode, uint16_t skip, uint16_t syncTimeout, uint8_t cteType)
Set default periodic advertising sync transfer parameters.
uint8_t advFiltPolicy
Definition: ll_api.h:359
uint16_t syncHandle
Definition: ll_api.h:1135
uint8_t LlGetTxPowerLevel(uint16_t handle, uint8_t type, int8_t *pLevel)
Get connection&#39;s TX power level.
bdAddr_t directAddr
Definition: ll_api.h:1091
void LlExtScanMasterInit(void)
Initialize LL subsystem for operation for extended scanning master.
uint8_t LlSetSetScanChanMap(uint8_t chanMap)
Set scan channel map.
uint16_t handle
Definition: ll_api.h:838
uint8_t LlSetPeriodicAdvData(uint8_t handle, uint8_t op, uint8_t len, const uint8_t *pData)
Set periodic advertising data.
void LlGetBdAddr(uint8_t *pAddr)
Get Bluetooth device address.
LlCisReqInd_t cisReq
Definition: ll_api.h:1230
uint8_t * LlRecvIsoData(void)
Receive an ISO data packet.
void LlConnSlaveInit(void)
Initialize LL subsystem for operation as a connectable slave.
uint8_t LlReadPeriodicAdvListSize(uint8_t *pListSize)
Read total number of devices in periodic advertiser list command.
wsfMsgHdr_t hdr
Definition: ll_api.h:1116
void LlScInit(void)
Initialize LL subsystem for secure connections.
uint8_t filterPolicy
Definition: ll_api.h:568
uint16_t handle
Definition: ll_api.h:964
bdAddr_t addr
Definition: ll_api.h:827
uint8_t LlSetEncMode(uint16_t handle, const LlEncMode_t *pMode)
Set encryption mode used in a connection.
void LlExtAdvSlaveInit(void)
Initialize LL subsystem for operation for extended advertising slave.
bool_t stableModIdxTxSup
Definition: ll_api.h:158
uint16_t connIntervalMin
Definition: ll_api.h:585
uint8_t LlGetRandAddr(uint8_t *pAddr)
Get random device address.
LlPerAdvEnableCnf_t perAdvEnableCnf
Definition: ll_api.h:1222
uint16_t auxPtrOffsetUsec
Definition: ll_api.h:132
uint16_t advEventProp
Definition: ll_api.h:352
uint32_t sduIntervalMToS
Definition: ll_api.h:645
wsfMsgHdr_t hdr
Definition: ll_api.h:905
uint8_t ownAddrType
Definition: ll_api.h:356
void LlGetExtScanContextSize(uint8_t *pMaxExtScan, uint16_t *pExtScanCtxSize)
Get extended scan context size.
uint8_t LlCreateCis(uint8_t numCis, LlCisCreateCisParams_t *pCreateCisParam)
Used by the master host to establish one or more connected isochronous streams.
Periodic advertising enable.
Definition: ll_api.h:1023
uint16_t scanWindow
Definition: ll_api.h:579
uint8_t LlSetExtScanRespData(uint8_t handle, uint8_t op, uint8_t fragPref, uint8_t len, const uint8_t *pData)
Set extended scan response data.
uint8_t advSID
Definition: ll_api.h:364
void LlScanReportEnable(uint8_t enable)
Scan report enable.
uint8_t LlSetScanParam(const LlScanParam_t *pParam)
Set scan parameters.
uint16_t maxCeLen
Definition: ll_api.h:590
uint16_t perAdvInterval
Definition: ll_api.h:1176
LTK request indication.
Definition: ll_api.h:929
Data length change.
Definition: ll_api.h:961
uint8_t LlSetCigParamsTest(LlCisCigParamsTest_t *pSetCigParamTest, uint16_t *pCisHandles)
Used by a master Host to set the parameters of all connected isochronous streams associated with a co...
uint8_t LlSetExtAdvParam(uint8_t handle, LlExtAdvParam_t *pExtAdvParam)
Set extended advertising parameters.
CIS create CIS parameters.
Definition: ll_api.h:681
uint8_t LlWriteRfPathComp(int16_t txPathComp, int16_t rxPathComp)
Write RF path compensation.
wsfMsgHdr_t hdr
Definition: ll_api.h:931
bdAddr_t peerRpa
Definition: ll_api.h:848
Extended advertising parameters.
Definition: ll_api.h:350
wsfMsgHdr_t hdr
Definition: ll_api.h:1080
uint8_t * pAdvAddr
Definition: ll_api.h:491
void LlSetDefaultExtAdvTxPhyOptions(const uint8_t phyOptions)
Set the default Ext adv TX PHY options.
uint8_t packing
Definition: ll_api.h:648
uint8_t LlGetAdvSetRandAddr(uint8_t handle, uint8_t *pAddr)
Get advertising set random device address.
LlAdvReportInd_t advReportInd
Definition: ll_api.h:1195
uint16_t duration
Definition: ll_api.h:372
uint8_t sca
Definition: ll_api.h:647
uint8_t status
Definition: ll_api.h:915
LlScanReqRcvdInd_t scanReqRcvdInd
Definition: ll_api.h:1218
uint8_t priAdvPhy
Definition: ll_api.h:361
bdAddr_t localRpa
Definition: ll_api.h:847
bool_t phy2mSup
Definition: ll_api.h:156
uint8_t LlEnhancedRxTest(uint8_t rfChan, uint8_t phy, uint8_t modIdx, uint16_t numPkt)
Enter enhanced receive test mode.
LlEncKeyRefreshInd_t keyRefreshInd
Definition: ll_api.h:1203
#define LL_FEAT_LEN
Definition: ll_api.h:900
Extended scan enable confirm.
Definition: ll_api.h:1097
void LlSendAclData(uint8_t *pData)
Send an ACL data packet.
uint8_t LlRequestPeerSca(uint16_t aclHandle)
Used to read the sleep clock accuracy of the peer device.
uint8_t ceJitterUsec
Definition: ll_api.h:142
void LlAdvSlaveInit(void)
Initialize LL subsystem for operation as an advertising slave.
uint16_t serviceData
Definition: ll_api.h:1170
uint16_t syncTimeOut
Definition: ll_api.h:484
bool_t phyCodedSup
Definition: ll_api.h:157
uint16_t numRxSuccess
Definition: ll_api.h:757
Connect update indication.
Definition: ll_api.h:861
uint8_t LlSetHciSupCmd(uint8_t byte, uint8_t bit, bool_t enable)
Set HCI supported command.
uint8_t phySToM
Definition: ll_api.h:634
uint8_t status
Definition: ll_api.h:941
uint8_t LlReadRemoteFeat(uint16_t handle)
Read remote features.
void(* llIsoCback_t)(uint16_t handle, uint8_t numBufs)
ISO callback.
Definition: ll_api.h:1241
void LlHandlerInit(wsfHandlerId_t handlerId)
Initialize LL subsystem with task handler.
uint16_t supTimeout
Definition: ll_api.h:879
void LlSetPeriodicAdvEnable(uint8_t enable, uint8_t handle)
Set periodic advertising enable.
uint16_t handle
Definition: ll_api.h:993
uint16_t LlStatsGetHandlerWatermarkUsec(void)
Get the LL handler watermark level.
LlLtkReqInd_t ltkReqInd
Definition: ll_api.h:1204
uint16_t isoInterval
Definition: ll_api.h:673
LE periodic advertising sync transfer received.
Definition: ll_api.h:1165
uint16_t connLatency
Definition: ll_api.h:843
uint8_t phyMToS
Definition: ll_api.h:1039
uint8_t LlSetPeriodicAdvSyncTransParams(uint16_t connHandle, uint8_t mode, uint16_t skip, uint16_t syncTimeout, uint8_t cteType)
Set periodic advertising sync transfer parameters.
int8_t rssi
Definition: ll_api.h:824
uint8_t LlPeriodicAdvTerminateSync(uint16_t syncHandle)
Stop synchronization of periodic advertising.
uint16_t encDiversifier
Definition: ll_api.h:934
wsfMsgHdr_t hdr
Definition: ll_api.h:1192
uint8_t LlGetIsoTxBufs(void)
Get the number of buffers in the LL ISO transmit queue.
uint8_t LlGetEncMode(uint16_t handle, LlEncMode_t *pMode)
Get encryption mode used in a connection.
void LlPhySlaveInit(void)
Initialize LL subsystem for PHY features (slave).
uint8_t initPhys
Definition: ll_api.h:572
uint8_t status
Definition: ll_api.h:992
uint16_t * pAclHandle
Definition: ll_api.h:684
Periodic advertising create sync command.
Definition: ll_api.h:477
uint8_t advAddrType
Definition: ll_api.h:490
uint16_t perAdvInterMin
Definition: ll_api.h:379
uint8_t LlSetPhy(uint16_t handle, uint8_t allPhys, uint8_t txPhys, uint8_t rxPhys, uint16_t phyOptions)
Set PHY for a connection.
bool_t(* llEvtCback_t)(LlEvt_t *pEvent)
Event callback.
Definition: ll_api.h:1235
bool_t enabled
Definition: ll_api.h:917
void LlInitMasterInit(void)
Initialize LL subsystem for operation as an initiating master.
Extended scan parameters.
Definition: ll_api.h:448
void LlCreateConnCancel(void)
Cancel a create connection operation.
uint8_t LlReadNumSupAdvSets(uint8_t *pNumSets)
Read number of supported advertising sets.
uint8_t LlRejectCisReq(uint16_t cisHandle, uint8_t reason)
Used by the slave host to inform the controller to reject the request for the connected isochronous s...
bdAddr_t directAddr
Definition: ll_api.h:830
uint8_t status
Definition: ll_api.h:1184
uint8_t LlGenerateP256KeyPair(void)
Generate a P-256 public/private key pair.
uint8_t numIsoRxBuf
Definition: ll_api.h:145
uint8_t numCis
Definition: ll_api.h:650
wsfMsgHdr_t hdr
Definition: ll_api.h:821
LE request peer SCA complete.
Definition: ll_api.h:1181
uint16_t compId
Definition: ll_api.h:122
uint8_t peerAddrType
Definition: ll_api.h:570
void LlRecvIsoDataComplete(uint8_t numBufs)
Indicate that received ISO data buffer has been deallocated.
void LlScanEnable(uint8_t enable, uint8_t filterDup)
Scan enable.
uint8_t outputMaxPayloadSize
Definition: ll_api.h:696
uint16_t perAdvInterval
Definition: ll_api.h:1140
uint8_t defExtAdvDataFrag
Definition: ll_api.h:130
uint16_t LlInitConnMem(uint8_t *pFreeMem, uint32_t freeMemSize)
Initialize memory for connections.
uint16_t scanWindow
Definition: ll_api.h:441
void LlGetVersion(uint16_t *pCompId, uint8_t *pBtVer, uint16_t *pImplRev)
Get versions.
uint16_t maxIsoPduLen
Definition: ll_api.h:147
uint8_t code
Definition: ll_api.h:1002
uint8_t LlSetAdvSetRandAddr(uint8_t handle, const uint8_t *pAddr)
Set advertising set random device address.
uint16_t handle
Definition: ll_api.h:875
uint8_t maxAdvSets
Definition: ll_api.h:127
uint8_t peerAddrType
Definition: ll_api.h:561
LTK request reply confirm.
Definition: ll_api.h:938
uint64_t LlGetPeriodicChanMap(uint16_t handle, bool_t isAdv)
Get periodic channel map.
const uint8_t * pData
Definition: ll_api.h:1154
wsfMsgHdr_t hdr
Definition: ll_api.h:923
uint8_t LlWriteDefaultDataLen(uint16_t maxTxLen, uint16_t maxTxTime)
Write default data length.
HW error.
Definition: ll_api.h:999
Extended advertising report.
Definition: ll_api.h:1078
LlEncChangeInd_t encChangeInd
Definition: ll_api.h:1202
uint8_t LlWriteAuthPayloadTimeout(uint16_t handle, uint16_t timeout)
Write authenticated payload timeout value.
uint8_t LlExtCreateConn(const LlExtInitParam_t *pInitParam, const LlExtInitScanParam_t scanParam[], const LlConnSpec_t connSpec[])
Extended create connection.
void LlEncConnMasterInit(void)
Initialize LL subsystem for operation as a encryptable connectable slave.
uint16_t handle
Definition: ll_api.h:916
wsfMsgHdr_t hdr
Definition: ll_api.h:1125
LlPerSyncTrsfRcvdInd_t perASyncTrsfRcvdInd
Definition: ll_api.h:1227
Connection specification (LlCreateConn(), LlConnUpdate() and LlExtCreateConn()).
Definition: ll_api.h:583
uint16_t numTx
Definition: ll_api.h:756
void LlGetDefaultRunTimeCfg(LlRtCfg_t *pCfg)
Get default runtime configuration values.
uint8_t rteSToM
Definition: ll_api.h:638
uint8_t LlRemoteConnParamReqNegReply(uint16_t handle, uint8_t reason)
Remote connection parameter request negative reply.
LlAdvSetTermInd_t advSetTermInd
Definition: ll_api.h:1220
uint8_t usedChSel
Definition: ll_api.h:1127
LlCisCisParams_t * pCisParam
Definition: ll_api.h:651
CIS create CIS parameters.
Definition: ll_api.h:688
LlChSelInd_t usedChSelInd
Definition: ll_api.h:1221
uint8_t handle
Definition: ll_api.h:1117
uint8_t scanType
Definition: ll_api.h:452
uint8_t LlGetRssi(uint16_t handle, int8_t *pRssi)
Get RSSI of a connection.
uint16_t LlGetIsoMaxBufSize(void)
Get the maximum ISO buffers size between host and controller.
uint8_t LlEnhancedTxTest(uint8_t rfChan, uint8_t len, uint8_t pktType, uint8_t phy, uint16_t numPkt)
Enter enhanced transmit test mode.
void LlExtAdvEnable(uint8_t enable, uint8_t numAdvSets, LlExtAdvEnableParam_t enaParam[])
Extended advertising enable.
int16_t perAdvInter
Definition: ll_api.h:1089
uint8_t LlSetExtAdvData(uint8_t handle, uint8_t op, uint8_t fragPref, uint8_t len, const uint8_t *pData)
Set extended advertising data.
uint8_t LlSetFeatures(const uint8_t *pFeatures)
Set features.
LE periodic advertising synchronization established.
Definition: ll_api.h:1131
uint8_t LlReadPeerResolvableAddr(uint8_t addrType, const uint8_t *pIdentityAddr, uint8_t *pRpa)
Read peer resolvable address.
uint8_t LlReadLocalResolvableAddr(uint8_t addrType, const uint8_t *pIdentityAddr, uint8_t *pRpa)
Read local resolvable address.
void LlGetPerScanContextSize(uint8_t *pMaxPerScan, uint16_t *pPerScanCtxSize)
Get periodic scan context size.
uint8_t LlSetTxTestErrorPattern(uint32_t pattern)
Set pattern of errors for Tx test mode.
uint8_t LlModifySleepClockAccuracy(uint8_t action)
Modify the sleep clock accuracy.
uint8_t role
Definition: ll_api.h:839
uint8_t LlGetChannelMap(uint16_t handle, uint8_t *pChanMap)
Get connection&#39;s channel map.
uint8_t status
Definition: ll_api.h:837
uint64_t peerAddr
Definition: ll_api.h:1010
uint16_t auxDelayUsec
Definition: ll_api.h:131
uint8_t LlConnUpdate(uint16_t handle, const LlConnSpec_t *pConnSpec)
Update connection parameters.
wsfMsgHdr_t hdr
Definition: ll_api.h:863
Generate Diffie-Hellman key complete.
Definition: ll_api.h:981
uint16_t subEvtSpaceDelay
Definition: ll_api.h:152
uint16_t scanInterval
Definition: ll_api.h:440
uint8_t advClkAccuracy
Definition: ll_api.h:1177
uint32_t priAdvInterMax
Definition: ll_api.h:354
LlLtkReqReplyCnf_t ltkReqReplyCnf
Definition: ll_api.h:1206
void LlReset(void)
Reset LL subsystem.
uint8_t scanReqNotifEna
Definition: ll_api.h:365
uint16_t connIntervalMin
Definition: ll_api.h:876
wsfMsgHdr_t hdr
Definition: ll_api.h:963
void LlReadDefaultDataLen(uint16_t *pMaxTxLen, uint16_t *pMaxTxTime)
Read default data length.
wsfMsgHdr_t hdr
Definition: ll_api.h:1167
uint16_t cisHandle
Definition: ll_api.h:1036
uint8_t LlIsoRxTest(uint16_t isoHandle, uint8_t plLen)
Enable ISO Rx test.
uint8_t LlSetChannelClass(const uint8_t *pChanMap)
Set channel class.
uint8_t LlSetRandAddr(const uint8_t *pAddr)
Set random device address.
void LlHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg)
LL message dispatch handler.
uint8_t LlLtkReqReply(uint16_t handle, const uint8_t *pKey)
Reply to a LTK request.
uint16_t scanInterval
Definition: ll_api.h:450
uint16_t maxAclLen
Definition: ll_api.h:140
uint8_t advHandle
Definition: ll_api.h:1108
LlPerAdvReportInd_t perAdvReportInd
Definition: ll_api.h:1224
uint8_t LlLtkReqNegReply(uint16_t handle)
Negative reply to a LTK request.
void LlCisMasterInit(void)
Initialize LL subsystem for operation for master connected isochronous stream.
Definition: