Mistake on this page?
Report an issue in GitHub or email us
lhci_int.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief LL HCI main module 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 LHCI_INT_H
26 #define LHCI_INT_H
27 
28 #include "lhci_api.h"
29 #include "hci_defs.h"
30 #include "ll_api.h"
31 #include "wsf_os.h"
32 #include "wsf_queue.h"
33 #include "util/bstream.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /*!
40  * \addtogroup LL_LHCI_INT
41  * \{
42  */
43 
44 /**************************************************************************************************
45  Macros
46 **************************************************************************************************/
47 
48 /* Command complete parameter lengths */
49 
50 /* --- Controller Group --- */
51 #define LHCI_LEN_SET_EVENT_MASK_EVT 1 /*!< Set event mask command complete event length. */
52 #define LHCI_LEN_RESET_EVT 1 /*!< Reset command complete event length. */
53 #define LHCI_LEN_READ_PWR_LVL_EVT 4 /*!< Read power level command complete event length. */
54 #define LHCI_LEN_READ_AUTH_PAYLOAD_TO_EVT 5 /*!< Read authenticated payload timeout command complete event length. */
55 #define LHCI_LEN_WRITE_AUTH_PAYLOAD_TO_EVT 3 /*!< Write authenticated payload timeout command complete event length. */
56 
57 /* --- Informational commands --- */
58 #define LHCI_LEN_READ_LOCAL_VER_EVT 9 /*!< Read local version command complete event length. */
59 #define LHCI_LEN_READ_LOCAL_SUP_CMDS_EVT 65 /*!< Read local supported commands command complete event length. */
60 #define LHCI_LEN_READ_LOCAL_SUP_FEAT_EVT 9 /*!< Read local supported feature command complete event length. */
61 #define LHCI_LEN_READ_BUF_SIZE_EVT 8 /*!< Read buffer size command complete event length. */
62 #define LHCI_LEN_READ_BD_ADDR_EVT 7 /*!< Read BD address command complete event length. */
63 
64 /* --- LE controller commands --- */
65 #define LHCI_LEN_LE_SET_EVENT_MASK_EVT 1 /*!< LE set event mask command complete event length. */
66 #define LHCI_LEN_LE_READ_BUF_SIZE_EVT 4 /*!< LE read buffer size command complete event length. */
67 #define LHCI_LEN_LE_READ_LOCAL_SUP_FEAT_EVT 9 /*!< LE read local supported feature command complete event length. */
68 #define LHCI_LEN_LE_SET_RAND_ADDR_EVT 1 /*!< LE set random address command complete event length. */
69 #define LHCI_LEN_LE_SET_ADV_PARAM_EVT 1 /*!< LE set advertising parameter command complete event length. */
70 #define LHCI_LEN_LE_READ_ADV_TX_POWER_EVT 2 /*!< LE read advertising Tx power command complete event length. */
71 #define LHCI_LEN_LE_SET_ADV_DATA_EVT 1 /*!< LE set advertising data command complete event length. */
72 #define LHCI_LEN_LE_SET_SCAN_RESP_DATA_EVT 1 /*!< LE set scan response data command complete event length. */
73 #define LHCI_LEN_LE_SET_ADV_ENABLE_EVT 1 /*!< LE set advertising enable command complete event length. */
74 #define LHCI_LEN_LE_SET_SCAN_PARAM_EVT 1 /*!< LE set scan parameter command complete event length. */
75 #define LHCI_LEN_LE_SET_SCAN_ENABLE_EVT 1 /*!< LE set scan enable command complete event length. */
76 #define LHCI_LEN_LE_CREATE_CONN_CANCEL_EVT 1 /*!< LE create connection cancel command complete event length. */
77 #define LHCI_LEN_LE_READ_WL_SIZE_EVT 2 /*!< LE read white list size command complete event length. */
78 #define LHCI_LEN_LE_CLEAR_WHITE_LIST_EVT 1 /*!< LE clear white list command complete event length. */
79 #define LHCI_LEN_LE_ADD_DEV_WHITE_LIST_EVT 1 /*!< LE add device to white list command complete event length. */
80 #define LHCI_LEN_LE_REMOVE_DEV_WHITE_LIST_EVT 1 /*!< LE remove device from white list command complete event length. */
81 #define LHCI_LEN_LE_SET_HOST_CHAN_CLASS 1 /*!< LE set host channel class command complete event length. */
82 #define LHCI_LEN_LE_READ_CHAN_MAP_EVT 8 /*!< LE read channel map command complete event length. */
83 #define LHCI_LEN_LE_ENCRYPT_EVT 17 /*!< LE encrypt command complete event length. */
84 #define LHCI_LEN_LE_LTK_REQ_REPL_EVT 3 /*!< LE LTK request reply command complete event length. */
85 #define LHCI_LEN_LE_LTK_REQ_NEG_REPL_EVT 3 /*!< LE LTK request negative reply command complete event length. */
86 #define LHCI_LEN_LE_RAND_EVT 9 /*!< LE random command complete event length. */
87 #define LHCI_LEN_LE_READ_SUP_STATES_EVT 9 /*!< LE read supported states command complete event length. */
88 #define LHCI_LEN_LE_RECEIVER_TEST_EVT 1 /*!< LE receiver test command complete event length. */
89 #define LHCI_LEN_LE_TRANSMITTER_TEST_EVT 1 /*!< LE transmitter test command complete event length. */
90 #define LHCI_LEN_LE_TEST_END_EVT 3 /*!< LE test end command complete event length. */
91 /* New in version 4.1 */
92 #define LHCI_LEN_LE_REM_CONN_PARAM_REP 3 /*!< LE remote connection parameter reply command complete event length. */
93 #define LHCI_LEN_LE_REM_CONN_PARAM_NEG_REP 3 /*!< LE remote connection parameter negative reply command complete event length. */
94 /* New in version 4.2 */
95 #define LHCI_LEN_LE_SET_DATA_LEN 3 /*!< LE set data length command complete event length. */
96 #define LHCI_LEN_LE_READ_DEF_DATA_LEN 5 /*!< LE read default data length command complete event length. */
97 #define LHCI_LEN_LE_WRITE_DEF_DATA_LEN 1 /*!< LE write default data length command complete event length. */
98 #define LHCI_LEN_LE_ADD_DEV_RES_LIST_EVT 1 /*!< LE add device to resolving list command complete event length. */
99 #define LHCI_LEN_LE_REMOVE_DEV_RES_LIST_EVT 1 /*!< LE remove device from resolving list command complete event length. */
100 #define LHCI_LEN_LE_CLEAR_RES_LIST_EVT 1 /*!< LE clear resolving list command complete event length. */
101 #define LHCI_LEN_LE_READ_RES_LIST_SIZE_EVT 2 /*!< LE read resolving list size command complete event length. */
102 #define LHCI_LEN_LE_READ_PEER_RES_ADDR_EVT 7 /*!< LE read peer resolving address command complete event length. */
103 #define LHCI_LEN_LE_READ_LOCAL_RES_ADDR_EVT 7 /*!< LE read local resolving address command complete event length. */
104 #define LHCI_LEN_LE_SET_ADDR_RES_ENABLE_EVT 1 /*!< LE set address resolution enable command complete event length. */
105 #define LHCI_LEN_LE_SET_RES_PRIV_ADDR_TO_EVT 1 /*!< LE set resolving private address timeout command complete event length. */
106 #define LHCI_LEN_LE_READ_MAX_DATA_LEN 9 /*!< LE read maximum data length command complete event length. */
107 /* New in version 5.0 */
108 #define LHCI_LEN_LE_SET_PRIVACY_MODE 1 /*!< LE set privacy mode command complete event length. */
109 #define LHCI_LEN_LE_SET_ADV_SET_RAND_ADDR 1 /*!< LE set advertising set random address command complete event length. */
110 #define LHCI_LEN_LE_SET_EXT_ADV_PARAM 2 /*!< LE set extended advertising parameters command complete event length. */
111 #define LHCI_LEN_LE_SET_EXT_ADV_DATA 1 /*!< LE set extended advertising data command complete event length. */
112 #define LHCI_LEN_LE_SET_EXT_SCAN_RESP_DATA 1 /*!< LE set extended scan response data command complete event length. */
113 #define LHCI_LEN_LE_SET_EXT_ADV_ENABLE 1 /*!< LE set extended advertising enable command complete event length. */
114 #define LHCI_LEN_LE_READ_MAX_ADV_DATA_LEN 3 /*!< LE read maximum advertising data length command complete event length. */
115 #define LHCI_LEN_LE_READ_NUM_OF_SUP_ADV_SETS 2 /*!< LE read number of supported advertising sets command complete event length. */
116 #define LHCI_LEN_LE_REMOVE_ADV_SET 1 /*!< LE remove advertising set command complete event length. */
117 #define LHCI_LEN_LE_CLEAR_ADV_SETS 1 /*!< LE clear advertising sets command complete event length. */
118 #define LHCI_LEN_LE_SET_PER_ADV_PARAM 1 /*!< LE set periodic advertising parameters command complete event length. */
119 #define LHCI_LEN_LE_SET_PER_ADV_DATA 1 /*!< LE set periodic advertising data command complete event length. */
120 #define LHCI_LEN_LE_SET_PER_ADV_ENABLE 1 /*!< LE set periodic advertising enable command complete event length. */
121 #define LHCI_LEN_LE_SET_EXT_SCAN_PARAM 1 /*!< LE set extended scan parameter command complete event length. */
122 #define LHCI_LEN_LE_SET_EXT_SCAN_ENABLE 1 /*!< LE set extended scan enable command complete event length. */
123 #define LHCI_LEN_LE_PER_ADV_CREATE_SYNC_CANCEL 1 /*!< LE periodic advertising create sync cancel command complete event length. */
124 #define LHCI_LEN_LE_PER_ADV_TERMINATE_SYNC 1 /*!< LE periodic advertising terminate sync command complete event length. */
125 #define LHCI_LEN_LE_ADD_DEV_PER_ADV_LIST 1 /*!< LE add device from periodic advertising list command complete event length. */
126 #define LHCI_LEN_LE_REM_DEV_PER_ADV_LIST 1 /*!< LE remove device from periodic advertising list command complete event length. */
127 #define LHCI_LEN_LE_CLEAR_PER_ADV_LIST 1 /*!< LE clear periodic advertising list command complete event length. */
128 #define LHCI_LEN_LE_READ_PER_ADV_LIST_SIZE 2 /*!< LE read periodic advertising list size command complete event length. */
129 #define LHCI_LEN_LE_READ_SUP_TX_POWER 3 /*!< LE read supported Tx power command complete event length. */
130 #define LHCI_LEN_LE_WRITE_RF_PATH_COMP 1 /*!< LE write RF path compensation command complete event length. */
131 #define LHCI_LEN_LE_READ_RF_PATH_COMP 5 /*!< LE read RF path compensation command complete event length. */
132 #define LHCI_LEN_LE_SET_EXT_SCAN_ENABLE_EVT 1 /*!< LE set extended scan enable command complete event length. */
133 #define LHCI_LEN_LE_READ_PHY_EVT 5 /*!< LE read PHY command complete event length. */
134 #define LHCI_LEN_LE_SET_DEF_PHY_EVT 1 /*!< LE set default PHY command complete event length. */
135 #define LHCI_LEN_LE_ENHANCED_RECEIVER_TEST_EVT 1 /*!< LE enhanced receiver test command complete event length. */
136 #define LHCI_LEN_LE_ENHANCED_TRANSMITTER_TEST_EVT 1 /*!< LE enhanced transmitter test command complete event length. */
137 /* New in version 5.1 */
138 #define LHCI_LEN_LE_SET_PER_ADV_RCV_ENABLE 1 /*!< LE set periodic advertising receive enable command complete event length. */
139 #define LHCI_LEN_LE_PER_ADV_SYNC_TRANSFER 3 /*!< LE periodic advertising sync transfer command complete event length. */
140 #define LHCI_LEN_LE_PER_ADV_SET_INFO_TRANSFER 3 /*!< LE periodic advertising set info transfer command complete event length. */
141 #define LHCI_LEN_LE_SET_PAST_PARAM 3 /*!< LE set periodic advertising sync transfer parameters command complete event length. */
142 #define LHCI_LEN_LE_SET_DEFAULT_PAST_PARAM 1 /*!< LE set default periodic advertising sync transfer parameters command complete event length. */
143 #define LHCI_LEN_LE_MODIFY_SCA_EVT 1 /*!< LE Modify sleep clock accuracy event length. */
144 /* New in version 5.2 */
145 #define LHCI_LEN_LE_READ_BUF_SIZE_V2 7 /*!< LE read ISO buffer size command complete event length. */
146 #define LHCI_LEN_LE_READ_TX_SYNC 12 /*!< LE read ISO Tx sync. */
147 #define LHCI_LEN_LE_REMOVE_CIG 1 /*!< LE remove CIG. */
148 #define LHCI_LEN_LE_REJECT_CIS_REQ 1 /*!< LE reject CIS request. */
149 #define LHCI_LEN_LE_BIG_TERMINATE_SYNC 2 /*!< LE BIG terminate sync. */
150 #define LHCI_LEN_LE_SETUP_ISO_DATA_PATH 3 /*!< LE setup ISO data path. */
151 #define LHCI_LEN_LE_REMOVE_ISO_DATA_PATH 3 /*!< LE remove ISO data path. */
152 #define LHCI_LEN_LE_ISO_TX_TEST 1 /*!< LE ISO Tx Test. */
153 #define LHCI_LEN_LE_ISO_RX_TEST 1 /*!< LE ISO Rx Test. */
154 #define LHCI_LEN_LE_ISO_READ_TEST_COUNTER 15 /*!< LE ISO read test counter. */
155 #define LHCI_LEN_LE_ISO_TEST_END 15 /*!< LE ISO test end. */
156 #define LHCI_LEN_LE_SET_HOST_FEATURE 1 /*!< LE Set Host Feature. */
157 #define LHCI_LEN_LE_READ_ISO_LINK_QUAL 31 /*!< LE Read ISO link quality. */
158 #define LHCI_LEN_LE_READ_ENH_TX_POWER_EVT 6 /*!< LE Read enhanced TX power. */
159 #define LHCI_LEN_LE_SET_TX_POWER_REPORT_EVT 3 /*!< LE Set transmit power reporting enable event. */
160 #define LHCI_LEN_LE_SET_PATH_LOSS_REPORTING_PARAMS 3 /*!< LE Set path loss reporting parameters event. */
161 #define LHCI_LEN_LE_SET_PATH_LOSS_REPORTING_ENABLE 3 /*!< LE Set path loss reporting enable event. */
162 #define LHCI_LEN_CONFIG_DATA_PATH 1 /*!< Configure data path. */
163 #define LHCI_LEN_READ_LOCAL_SUP_CODECS 3 /*!< Read local supported codecs. */
164 #define LHCI_LEN_READ_LOCAL_SUP_CODEC_CAP 2 /*!< Read local supported codec configuration. */
165 #define LHCI_LEN_READ_LOCAL_SUP_CONTROLLER_DLY 7 /*!< Read local supported controller delay. */
166 
167 /*! \brief Mandatory event mask. */
168 #define LHCI_DEF_EVT_MASK UINT64_C(0x00001FFFFFFFFFFF);
169 
170 /*! \brief Default page 2 event mask. */
171 #define LHCI_DEF_EVT_PG2_MASK UINT64_C(0x0000000000000000);
172 
173 /*! \brief Default LE specific event mask. */
174 #define LHCI_DEF_LE_EVT_MASK UINT64_C(0x000000000000001F);
175 
176 /*! \brief Local supported features value. */
177 #define LHCI_LOCAL_SUP_FEAT_VAL UINT64_C(0x0000006000000000)
178  /* bit 37: BR/EDR Not Supported */
179  /* bit 38: LE Supported (Controller) */
180 
181 /*! \brief Convert bytes to bits. */
182 #define LHCI_BYTE_TO_BITS(x) (8 * x)
183 
184 /*! \brief Vendor specific event length. */
185 #define LHCI_LEN_VS_EVT 2
186 
187 /*! \brief Indicate command status event shall be returned. */
188 #define LHCI_LEN_CMD_STATUS_EVT 0xFF
189 
190 /* Packetcraft vendor specific OCF range is 0x3C0-0x3FF */
191 #define LHCI_OPCODE_VS_SET_SCAN_CH_MAP HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E0) /*!< Set Scan Channel Map opcode. */
192 #define LHCI_OPCODE_VS_SET_EVENT_MASK HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E1) /*!< Set Vendor Specific Event Mask opcode. */
193 #define LHCI_OPCODE_VS_SET_RSRC_MGR_MODE HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E2) /*!< DEPRECATED. */
194 #define LHCI_OPCODE_VS_ENA_ACL_SINK HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E3) /*!< Enable ACL Packet Sink opcode. */
195 #define LHCI_OPCODE_VS_GENERATE_ACL HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E4) /*!< Generate ACL Packets opcode. */
196 #define LHCI_OPCODE_VS_ENA_AUTO_GEN_ACL HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E5) /*!< Enable Auto Generate ACL Packets opcode. */
197 #define LHCI_OPCODE_VS_SET_TX_TEST_ERR_PATT HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E6) /*!< Set Tx Test Error Pattern opcode. */
198 #define LHCI_OPCODE_VS_SET_CONN_OP_FLAGS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E7) /*!< Set Connection Operational Flags opcode. */
199 #define LHCI_OPCODE_VS_SET_P256_PRIV_KEY HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E8) /*!< Set P-256 Private Key opcode. */
200 #define LHCI_OPCODE_VS_GET_PER_CHAN_MAP HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3DE) /*!< Get channel map of periodic scan/adv. */
201 #define LHCI_OPCODE_VS_SET_HCI_SUP_CMD HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3DF) /*!< DEPRECATED. */
202 #define LHCI_OPCODE_VS_GET_ACL_TEST_REPORT HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E9) /*!< Get ACL Test Report opcode. */
203 #define LHCI_OPCODE_VS_SET_LOCAL_MIN_USED_CHAN HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3EA) /*!< Set local minimum number of used channels. */
204 #define LHCI_OPCODE_VS_GET_PEER_MIN_USED_CHAN HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3EB) /*!< Get peer minimum number of used channels. */
205 #define LHCI_OPCODE_VS_VALIDATE_PUB_KEY_MODE HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3EC) /*!< Set validate public key mode between ALT1 and ALT2. */
206 
207 #define LHCI_OPCODE_VS_SET_BD_ADDR HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F0) /*!< Set BD address opcode. */
208 #define LHCI_OPCODE_VS_GET_RAND_ADDR HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F1) /*!< Get Random Address opcode. */
209 #define LHCI_OPCODE_VS_SET_LOCAL_FEAT HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F2) /*!< Set Local Feature opcode. */
210 #define LHCI_OPCODE_VS_SET_OP_FLAGS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F3) /*!< Set Operational Flags opcode. */
211 #define LHCI_OPCODE_VS_SET_ADV_TX_PWR HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F5) /*!< Set Advertising Tx Power opcode. */
212 #define LHCI_OPCODE_VS_SET_CONN_TX_PWR HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F6) /*!< Set Connection Tx Power opcode. */
213 #define LHCI_OPCODE_VS_SET_ENC_MODE HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F7) /*!< Set Encryption Mode opcode. */
214 #define LHCI_OPCODE_VS_SET_CHAN_MAP HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F8) /*!< Set Channel Map opcode. */
215 
216 #define LHCI_OPCODE_VS_SET_DIAG_MODE HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F9) /*!< Set Diagnostic Mode opcode. */
217 #define LHCI_OPCODE_VS_SET_SNIFFER_ENABLE HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3CD) /*!< Enable sniffer packet forwarding. */
218 
219 #define LHCI_OPCODE_VS_GET_PDU_FILT_STATS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F4) /*!< Get PDU Filter Statistics opcode. */
220 #define LHCI_OPCODE_VS_GET_SYS_STATS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3FA) /*!< Get Memory Statistics opcode. */
221 #define LHCI_OPCODE_VS_GET_ADV_STATS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3FB) /*!< Get Advertising Statistics opcode. */
222 #define LHCI_OPCODE_VS_GET_SCAN_STATS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3FC) /*!< Get Scan Statistics opcode. */
223 #define LHCI_OPCODE_VS_GET_CONN_STATS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3FD) /*!< Get Connection Statistics opcode. */
224 #define LHCI_OPCODE_VS_GET_TEST_STATS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3FE) /*!< Get Test Statistics opcode. */
225 #define LHCI_OPCODE_VS_GET_POOL_STATS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3FF) /*!< Get Pool Statistics opcode. */
226 
227 #define LHCI_OPCODE_VS_SET_AUX_DELAY HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D0) /*!< Set Additional AuxPtr offset. */
228 #define LHCI_OPCODE_VS_SET_EXT_ADV_FRAG_LEN HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D1) /*!< Set extended advertising data fragmentation length. */
229 #define LHCI_OPCODE_VS_SET_EXT_ADV_PHY_OPTS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D2) /*!< Set extended advertising PHY options. */
230 #define LHCI_OPCODE_VS_SET_EXT_ADV_DEF_PHY_OPTS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D3) /*!< Set extended advertising default PHY options. */
231 #define LHCI_OPCODE_VS_SET_EXT_SCAN_PHY_OPTS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D4) /*!< Set extended scanning default PHY options. */
232 #define LHCI_OPCODE_VS_GENERATE_ISO HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D5) /*!< Generate ISO Packets opcode. */
233 #define LHCI_OPCODE_VS_GET_ISO_TEST_REPORT HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D6) /*!< Get ISO Test Report opcode. */
234 #define LHCI_OPCODE_VS_ENA_ISO_SINK HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D7) /*!< Enable ISO Packet Sink opcode. */
235 #define LHCI_OPCODE_VS_ENA_AUTO_GEN_ISO HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D8) /*!< Enable Auto Generate ISO Packets opcode. */
236 #define LHCI_OPCODE_VS_GET_CIS_STATS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D9) /*!< Get ISO Connection Statistics opcode. */
237 
238 #define LHCI_OPCODE_VS_GET_AUX_ADV_STATS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3DA) /*!< Get Auxiliary Advertising Statistics opcode. */
239 #define LHCI_OPCODE_VS_GET_AUX_SCAN_STATS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3DB) /*!< Get Auxiliary Scanning Statistics opcode. */
240 #define LHCI_OPCODE_VS_GET_PER_SCAN_STATS HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3DC) /*!< Get Periodic Scanning Statistics opcode. */
241 
242 #define LHCI_OPCODE_VS_SET_CONN_PHY_TX_PWR HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3DD) /*!< Set Connection Phy Tx Power opcode. */
243 
244 
245 /* Vendor specific event masks. */
246 #define LHCI_VS_EVT_MASK_SCAN_REPORT_EVT 0x01 /*!< (Byte 0) VS event bit, scan report. */
247 #define LHCI_VS_EVT_MASK_DIAG_TRACE_EVT 0x02 /*!< (Byte 0) VS event bit, diagnostic tracing. */
248 #define LHCI_VS_EVT_MASK_ISO_EVENT_CMPL_EVT 0x04 /*!< (Byte 0) VS event bit, ISO event complete. */
249 
250 /**************************************************************************************************
251  Data Types
252 **************************************************************************************************/
253 
254 /*! \brief Message handler types. */
255 enum
256 {
257  LHCI_MSG_PRIV, /*!< Privacy command handler type. Must be before CONN. */
258  LHCI_MSG_CONN, /*!< Connection command handler type. */
259  LHCI_MSG_CONN_CS2, /*!< Connection Channel Selection 2 command handler type. */
260  LHCI_MSG_ENC, /*!< Encryption command handler type. */
261  LHCI_MSG_SCAN, /*!< Scan command handler type. */
262  LHCI_MSG_EXT_SCAN, /*!< Extended scan command handler type. */
263  LHCI_MSG_PER_SCAN, /*!< Periodic scan command handler type. */
264  LHCI_MSG_ADV, /*!< Advertising command handler type. */
265  LHCI_MSG_EXT_ADV, /*!< Extended advertising command handler type. */
266  LHCI_MSG_PER_ADV, /*!< Periodic advertising command handler type. */
267  LHCI_MSG_SC, /*!< Secure connections command handler type. */
268  LHCI_MSG_PHY, /*!< PHY features command handler type. */
269  LHCI_MSG_PAST, /*!< Periodic advertising sync transfer command handler type. */
270  LHCI_MSG_CIS_MST, /*!< Connected isochronous stream master features command handler type. */
271  LHCI_MSG_CIS_SLV, /*!< Connected isochronous stream slave features command handler type. */
272  LHCI_MSG_BIS_MST, /*!< Broadcast isochronous stream master features command handler type. */
273  LHCI_MSG_BIS_SLV, /*!< Broadcast isochronous stream slave features command handler type. */
274  LHCI_MSG_ISO, /*!< Isochronous features command handler type. */
275  LHCI_MSG_PC, /*!< Power control handler type. */
276  LHCI_MSG_VS_EXT, /*!< Extended vendor specific command handler type. */
277  LHCI_MSG_TESTER, /*!< Tester vendor specific command handler type. */
278  LHCI_MSG_TOTAL /*!< Total number of command handlers. */
279 };
280 
281 /*! \brief Task event types. */
282 enum
283 {
284  LHCI_EVT_ACL_RCVD = (1 << 0), /*!< HCI ACL packet received. */
285  LHCI_EVT_CMD_RCVD = (1 << 1), /*!< HCI command packet received. */
286  LHCI_EVT_SEND_CMPL = (1 << 2), /*!< HCI event packet send completion. */
287  LHCI_EVT_HW_ERR = (1 << 3), /*!< HCI hardware error. */
288  LHCI_EVT_ISO_RCVD = (1 << 4), /*!< HCI ISO packet received. */
289 };
290 
291 /*! \brief Event handler call signature. */
292 typedef bool_t (*lhciEvtHandler_t)(LlEvt_t *pEvt);
293 
294 /*! \brief Service ACL call signature. */
295 typedef uint8_t *(*lhciServiceAcl_t)(void);
296 
297 /*! \brief Service SCO call signature. */
298 typedef uint8_t *(*lhciServiceIso_t)(void);
299 
300 /*! \brief Control block of the LL HCI subsystem (persists with resets). */
301 typedef struct
302 {
303  wsfHandlerId_t handlerId; /*!< Task handler ID. */
304 
305  wsfQueue_t aclQ; /*!< ACL queue. */
306  wsfQueue_t cmdQ; /*!< Command queue. */
307  wsfQueue_t evtQ; /*!< Event queue. */
308  wsfQueue_t isoQ; /*!< ISO queue. */
309  bool_t evtTrPending; /*!< Event transport in progress. */
310 
311  uint8_t supCmds[HCI_SUP_CMD_LEN];
312  /*!< Supported HCI commands bit mask. */
314 
315 /*! \brief Control block of the LL HCI subsystem (cleared with resets). */
316 typedef struct
317 {
318  uint64_t evtMsk; /*!< General event mask. */
319  uint64_t evtMskPg2; /*!< General event mask page 2. */
320  uint64_t leEvtMsk; /*!< LE specific event mask. */
321  lhciCompHandler_t evtCompCback; /*!< Event complete handler. */
322 
323  uint8_t numScanReqRcvd; /*!< Number of scan request received. */
324  uint8_t hwErrorCode; /*!< Hardware error code. */
325 
326  bool_t recvAclSink; /*!< Receive ACL sink. */
327  uint32_t recvAclPktCnt; /*!< Receive ACL packet count. */
328  uint32_t recvAclOctetCnt; /*!< Receive ACL octet count. */
329  bool_t genEnaFlag; /*!< Generate enable flag. */
330  uint8_t genPldCnt; /*!< Generate ACL packet fill value. */
331  uint16_t genPktLen; /*!< Generate ACL packet length (0 to disable). */
332  uint32_t genPktCnt; /*!< Generate ACL packet count. */
333  uint32_t genOctetCnt; /*!< Generate ACL octet count. */
334 
335  uint8_t numAdvReport; /*!< Number of pending advertising reports. */
336 } lhciCb_t;
337 
338 /*! \brief Control block for ISO data generator. */
339 typedef struct
340 {
341  bool_t recvIsoSink; /*!< Receive ISO sink. */
342  uint32_t recvIsoPktCnt; /*!< Receive ISO packet count. */
343  uint32_t recvIsoOctetCnt; /*!< Receive ISO octet count. */
344  bool_t genEnaFlag; /*!< Generate ISO enable flag. */
345  uint8_t genPldCnt; /*!< Generate ISO packet fill value. */
346  uint16_t genPktLen; /*!< Generate ISO packet length (0 to disable). */
347  uint32_t genPktCnt; /*!< Generate ISO packet count. */
348  uint32_t genOctetCnt; /*!< Generate ISO octet count. */
349 
350  bool_t isoRxTest; /*!< TRUE if ISO Rx test is enabled. */
351 } lhciIsoCb_t;
352 
353 /**************************************************************************************************
354  Global Variables
355 **************************************************************************************************/
356 
357 /*! \brief Command handler table. */
359 
360 /*! \brief Event handler table. */
362 
363 /*! \brief Receive pending handler. */
365 
366 /*! \brief Receive pending handler. */
368 
369 /* Persistent control block */
370 extern lhciPersistCb_t lhciPersistCb;
371 
372 /* Control block */
373 extern lhciCb_t lhciCb;
374 
375 /* Control block for ISO data generation. */
376 extern lhciIsoCb_t lhciIsoCb;
377 
378 /* Handler duration watermark in microseconds. */
379 extern uint16_t lhciHandlerWatermarkUsec;
380 
381 /**************************************************************************************************
382  Function Declarations
383 **************************************************************************************************/
384 
385 /* Reset */
386 void lhciReset(void);
387 
388 /* Data exchange */
389 void lhciRecv(uint8_t type, uint8_t *pBuf);
390 void lhciSendComplete(uint8_t type, uint8_t *pBuf);
391 bool_t lhciService(uint8_t *pType, uint16_t *pLen, uint8_t **pBuf);
392 void lhciSendHwError(uint8_t code);
393 
394 /* Handlers */
395 bool_t lhciLlEvtHandler(LlEvt_t *pEvt);
396 void lhciAclSendComplete(uint16_t handle, uint8_t numBufs);
397 uint8_t *lhciRecvAcl(void);
398 void lhciAclRecvPending(uint16_t handle, uint8_t numBufs);
399 void lhciGenerateAcl(uint16_t handle, uint16_t pktLen, uint8_t numPkts);
400 
401 void lhciIsoSendComplete(uint8_t numHandles, uint16_t *pHandle, uint16_t *pNumPkts);
402 uint8_t *lhciRecvIso(void);
403 void lhciIsoRecvPending(uint8_t numHandles, uint16_t *pHandle, uint16_t *pNumPkts);
404 void lhciGenerateIso(uint16_t handle, uint16_t pktLen, uint8_t numPkts);
405 
406 /* Command parser */
407 bool_t lhciCommonDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
408 bool_t lhciConnDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
409 bool_t lhciMstConnDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
410 bool_t lhciMstExtConnDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
411 bool_t lhciMstEncDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
412 bool_t lhciSlvEncDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
413 bool_t lhciMstScanDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
414 bool_t lhciSlvAdvDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
415 bool_t lhciMstExtScanDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
416 bool_t lhciSlvExtAdvDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
417 bool_t lhciPrivAdvDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
418 bool_t lhciPrivConnDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
419 bool_t lhciScDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
420 bool_t lhciPhyDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
421 bool_t lhciPastDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
422 bool_t lhciMstCisDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
423 bool_t lhciSlvCisDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
424 bool_t lhciSlvBisDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
425 bool_t lhciMstBisDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
426 bool_t lhciIsoDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
427 bool_t lhciPclDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
428 
429 bool_t lhciCommonVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
430 bool_t lhciConnVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
431 bool_t lhciMstConnVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
432 bool_t lhciMstScanVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
433 bool_t lhciSlvAdvVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
434 bool_t lhciSlvEncVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
435 bool_t lhciScVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
436 bool_t lhciMstExtScanVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
437 bool_t lhciSlvExtAdvVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
438 bool_t lhciVsExtDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
439 bool_t lhciIsoVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf);
440 
441 /* Event builders */
442 void lhciSendCmdStatusEvt(LhciHdr_t *pCmdHdr, uint8_t status);
443 bool_t lhciConnEncodeEvtPkt(LlEvt_t *pEvt);
444 bool_t lhciConnCsEncodeEvtPkt(LlEvt_t *pEvt);
445 bool_t lhciMstConnEncodeEvtPkt(LlEvt_t *pEvt);
446 bool_t lhciMstScanEncodeEvtPkt(LlEvt_t *pEvt);
447 bool_t lhciSlvAdvEncodeEvtPkt(LlEvt_t *pEvt);
448 bool_t lhciMstExtScanEncodeEvtPkt(LlEvt_t *pEvt);
449 bool_t lhciSlvExtAdvEncodeEvtPkt(LlEvt_t *pEvt);
450 bool_t lhciMstEncEncodeEvtPkt(LlEvt_t *pEvt);
451 bool_t lhciSlvEncEncodeEvtPkt(LlEvt_t *pEvt);
452 bool_t lhciPrivConnEncodeEvtPkt(LlEvt_t *pEvt);
453 bool_t lhciScEncodeEvtPkt(LlEvt_t *pEvt);
454 bool_t lhciPhyEncodeEvtPkt(LlEvt_t *pEvt);
455 bool_t lhciMstCisEncodeEvtPkt(LlEvt_t *pEvt);
456 bool_t lhciSlvCisEncodeEvtPkt(LlEvt_t *pEvt);
457 bool_t lhciSlvBigEncodeEvtPkt(LlEvt_t *pEvt);
458 bool_t lhciMstBisEncodeEvtPkt(LlEvt_t *pEvt);
459 bool_t lhciIsoEncodeEvtPkt(LlEvt_t *pEvt);
460 bool_t lhciPclEncodeEvtPkt(LlEvt_t *pEvt);
461 
462 
463 bool_t lhciSlvVsStdEncodeEvtPkt(LlEvt_t *pEvt);
464 
465 /* Events */
466 uint8_t *lhciAllocEvt(uint8_t evtCode, uint8_t paramLen);
467 uint8_t *lhciAllocCmdCmplEvt(uint8_t paramLen, uint16_t opCode);
468 void lhciConnSendCmdCmplEvt(LhciHdr_t *pCmdHdr, uint8_t status, uint8_t paramLen, uint8_t *pParam, uint16_t handle);
469 void lhciPclSendCmdCmplEvt(LhciHdr_t *pCmdHdr, uint8_t status, uint8_t paramLen, uint8_t *pParam, uint16_t handle);
470 
471 /* Command packet. */
472 uint8_t lhciUnpackConnSpec(LlConnSpec_t *pConnSpec, const uint8_t *pBuf);
473 
474 /*************************************************************************************************/
475 /*!
476  * \brief Pack an event packet header.
477  *
478  * \param pBuf Packed packet buffer.
479  * \param evtCode Event code.
480  * \param paramLen Parameter length.
481  *
482  * \return Packet length.
483  */
484 /*************************************************************************************************/
485 static inline uint8_t lhciPackEvtHdr(uint8_t *pBuf, uint8_t evtCode, uint8_t paramLen)
486 {
487  const uint8_t len = HCI_EVT_HDR_LEN;
488 
489  UINT8_TO_BSTREAM(pBuf, evtCode);
490  UINT8_TO_BSTREAM(pBuf, paramLen);
491 
492  return len;
493 }
494 
495 /*************************************************************************************************/
496 /*!
497  * \brief Pack a command status event packet.
498  *
499  * \param pBuf Packed packet buffer.
500  * \param status Completion status.
501  * \param opCode OpCode.
502  *
503  * \return Packet length.
504  */
505 /*************************************************************************************************/
506 static inline uint8_t lhciPackCmdStatusEvt(uint8_t *pBuf, uint8_t status, uint16_t opCode)
507 {
508  const uint8_t len = HCI_LEN_CMD_STATUS;
509 
510  UINT8_TO_BSTREAM (pBuf, status);
511  UINT8_TO_BSTREAM (pBuf, 1); /* Num_HCI_Command_Packets is always 1 */
512  UINT16_TO_BSTREAM(pBuf, opCode);
513 
514  return len;
515 }
516 
517 /*************************************************************************************************/
518 /*!
519  * \brief Pack a command complete event packet.
520  *
521  * \param pBuf Packed packet buffer.
522  * \param opCode OpCode.
523  *
524  * \return Packet length.
525  */
526 /*************************************************************************************************/
527 static inline uint8_t lhciPackCmdCompleteEvt(uint8_t *pBuf, uint16_t opCode)
528 {
529  const uint8_t len = HCI_LEN_CMD_CMPL;
530 
531  UINT8_TO_BSTREAM (pBuf, 1); /* Num_HCI_Command_Packets is always 1 */
532  UINT16_TO_BSTREAM(pBuf, opCode);
533 
534  return len;
535 }
536 
537 /*************************************************************************************************/
538 /*!
539  * \brief Pack a command complete status parameter.
540  *
541  * \param pBuf Packed packet buffer.
542  * \param status Completion status.
543  *
544  * \return Packet length.
545  */
546 /*************************************************************************************************/
547 static inline uint8_t lhciPackCmdCompleteEvtStatus(uint8_t *pBuf, uint8_t status)
548 {
549  const uint8_t len = sizeof(uint8_t);
550 
551  UINT8_TO_BSTREAM (pBuf, status);
552 
553  return len;
554 }
555 
556 /*************************************************************************************************/
557 /*!
558  * \brief Pack a vendor specific event packet.
559  *
560  * \param pBuf Packed packet buffer.
561  * \param vsEvtCode Event code.
562  *
563  * \return Packet length.
564  */
565 /*************************************************************************************************/
566 static inline uint8_t lhciPackVsEvt(uint8_t *pBuf, uint16_t vsEvtCode)
567 {
568  const uint8_t len = LHCI_LEN_VS_EVT;
569 
570  UINT16_TO_BSTREAM(pBuf, vsEvtCode);
571 
572  return len;
573 }
574 
575 /*************************************************************************************************/
576 /*!
577  * \brief Send an event.
578  *
579  * \param pEvtBuf Buffer containing event.
580  */
581 /*************************************************************************************************/
582 static inline void lhciSendEvt(uint8_t *pEvtBuf)
583 {
584  LhciSendEvent(pEvtBuf - HCI_EVT_HDR_LEN);
585 }
586 
587 /*************************************************************************************************/
588 /*!
589  * \brief Send a command complete event.
590  *
591  * \param pEvtBuf Buffer containing command complete event.
592  */
593 /*************************************************************************************************/
594 static inline void lhciSendCmdCmplEvt(uint8_t *pEvtBuf)
595 {
596  LhciSendEvent(pEvtBuf - (HCI_EVT_HDR_LEN + HCI_LEN_CMD_CMPL));
597 }
598 
599 /*! \} */ /* LL_INT_LHCI */
600 
601 #ifdef __cplusplus
602 };
603 #endif
604 
605 #endif /* LHCI_INT_H */
lhciEvtHandler_t lhciEvtTbl[LHCI_MSG_TOTAL]
Event handler table.
static uint8_t lhciPackEvtHdr(uint8_t *pBuf, uint8_t evtCode, uint8_t paramLen)
Pack an event packet header.
Definition: lhci_int.h:485
#define LHCI_LEN_VS_EVT
Vendor specific event length.
Definition: lhci_int.h:185
uint32_t recvIsoPktCnt
Definition: lhci_int.h:342
Link layer interface file.
Control block for ISO data generator.
Definition: lhci_int.h:339
bool_t recvIsoSink
Definition: lhci_int.h:341
static void lhciSendCmdCmplEvt(uint8_t *pEvtBuf)
Send a command complete event.
Definition: lhci_int.h:594
bool_t recvAclSink
Definition: lhci_int.h:326
bool_t genEnaFlag
Definition: lhci_int.h:329
HCI constants and definitions from the Bluetooth specification.
static uint8_t lhciPackCmdCompleteEvt(uint8_t *pBuf, uint16_t opCode)
Pack a command complete event packet.
Definition: lhci_int.h:527
void(* lhciCompHandler_t)(void)
Event complete handler call signature.
Definition: lhci_api.h:51
uint16_t genPktLen
Definition: lhci_int.h:331
#define UINT8_TO_BSTREAM(p, n)
convert uint8_t to little endian byte stream, incrementing one byte.
Definition: bstream.h:161
uint32_t recvAclPktCnt
Definition: lhci_int.h:327
static uint8_t lhciPackVsEvt(uint8_t *pBuf, uint16_t vsEvtCode)
Pack a vendor specific event packet.
Definition: lhci_int.h:566
uint8_t numScanReqRcvd
Definition: lhci_int.h:323
uint32_t genPktCnt
Definition: lhci_int.h:347
lhciCmdHandler_t lhciCmdTbl[LHCI_MSG_TOTAL]
Command handler table.
wsfQueue_t cmdQ
Definition: lhci_int.h:306
uint8_t *(* lhciServiceAcl_t)(void)
Service ACL call signature.
Definition: lhci_int.h:295
bool_t(* lhciCmdHandler_t)(LhciHdr_t *pHdr, uint8_t *pBuf)
Command handler call signature.
Definition: lhci_api.h:48
uint8_t numAdvReport
Definition: lhci_int.h:335
wsfHandlerId_t handlerId
Definition: lhci_int.h:303
lhciCompHandler_t evtCompCback
Definition: lhci_int.h:321
wsfQueue_t aclQ
Definition: lhci_int.h:305
#define HCI_LEN_CMD_CMPL
Definition: hci_defs.h:728
static void lhciSendEvt(uint8_t *pEvtBuf)
Send an event.
Definition: lhci_int.h:582
Control block of the LL HCI subsystem (cleared with resets).
Definition: lhci_int.h:316
uint8_t hwErrorCode
Definition: lhci_int.h:324
uint32_t recvAclOctetCnt
Definition: lhci_int.h:328
bool_t genEnaFlag
Definition: lhci_int.h:344
#define HCI_EVT_HDR_LEN
Definition: hci_defs.h:41
bool_t evtTrPending
Definition: lhci_int.h:309
uint8_t wsfHandlerId_t
Event handler ID data type.
Definition: wsf_os.h:80
Queue structure.
Definition: wsf_queue.h:46
uint64_t evtMsk
Definition: lhci_int.h:318
Union of all event types.
Definition: ll_api.h:1462
static uint8_t lhciPackCmdCompleteEvtStatus(uint8_t *pBuf, uint8_t status)
Pack a command complete status parameter.
Definition: lhci_int.h:547
uint16_t genPktLen
Definition: lhci_int.h:346
wsfQueue_t isoQ
Definition: lhci_int.h:308
uint32_t genOctetCnt
Definition: lhci_int.h:333
Byte stream to integer conversion macros.
bool_t(* lhciEvtHandler_t)(LlEvt_t *pEvt)
Event handler call signature.
Definition: lhci_int.h:292
#define HCI_SUP_CMD_LEN
Definition: hci_defs.h:922
uint32_t genPktCnt
Definition: lhci_int.h:332
#define UINT16_TO_BSTREAM(p, n)
convert uint16_t to little endian byte stream, incrementing two bytes.
Definition: bstream.h:163
uint32_t genOctetCnt
Definition: lhci_int.h:348
uint8_t *(* lhciServiceIso_t)(void)
Service SCO call signature.
Definition: lhci_int.h:298
uint64_t evtMskPg2
Definition: lhci_int.h:319
General purpose queue service.
Link layer HCI subsystem API.
#define HCI_LEN_CMD_STATUS
Definition: hci_defs.h:729
bool_t isoRxTest
Definition: lhci_int.h:350
uint8_t genPldCnt
Definition: lhci_int.h:330
lhciServiceAcl_t lhciServiceAcl
Receive pending handler.
Control block of the LL HCI subsystem (persists with resets).
Definition: lhci_int.h:301
HCI header.
Definition: lhci_api.h:41
Connection specification (LlCreateConn(), LlConnUpdate() and LlExtCreateConn()).
Definition: ll_api.h:624
uint64_t leEvtMsk
Definition: lhci_int.h:320
uint8_t genPldCnt
Definition: lhci_int.h:345
wsfQueue_t evtQ
Definition: lhci_int.h:307
Software foundation OS API.
lhciServiceIso_t lhciServiceIso
Receive pending handler.
static uint8_t lhciPackCmdStatusEvt(uint8_t *pBuf, uint8_t status, uint16_t opCode)
Pack a command status event packet.
Definition: lhci_int.h:506
uint32_t recvIsoOctetCnt
Definition: lhci_int.h:343
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.