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

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.