Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
hci_vs.h
Go to the documentation of this file.
1/* hci_vs.h - Bluetooth Host Control Interface Vendor Specific definitions */
2
3/*
4 * Copyright (c) 2017-2018 Nordic Semiconductor ASA
5 * Copyright (c) 2015-2016 Intel Corporation
6 *
7 * SPDX-License-Identifier: Apache-2.0
8 */
9#ifndef ZEPHYR_INCLUDE_BLUETOOTH_HCI_VS_H_
10#define ZEPHYR_INCLUDE_BLUETOOTH_HCI_VS_H_
11
12#include <bluetooth/hci.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#define BT_VS_CMD_BIT_VERSION 0
19#define BT_VS_CMD_BIT_SUP_CMD 1
20#define BT_VS_CMD_BIT_SUP_FEAT 2
21#define BT_VS_CMD_BIT_SET_EVT_MASK 3
22#define BT_VS_CMD_BIT_RESET 4
23#define BT_VS_CMD_BIT_WRITE_BDADDR 5
24#define BT_VS_CMD_BIT_SET_TRACE_ENABLE 6
25#define BT_VS_CMD_BIT_READ_BUILD_INFO 7
26#define BT_VS_CMD_BIT_READ_STATIC_ADDRS 8
27#define BT_VS_CMD_BIT_READ_KEY_ROOTS 9
28#define BT_VS_CMD_BIT_READ_CHIP_TEMP 10
29#define BT_VS_CMD_BIT_READ_HOST_STACK_CMD 11
30#define BT_VS_CMD_BIT_SET_SCAN_REP_ENABLE 12
31#define BT_VS_CMD_BIT_WRITE_TX_POWER 13
32#define BT_VS_CMD_BIT_READ_TX_POWER 14
33
34#define BT_VS_CMD_SUP_FEAT(cmd) BT_LE_FEAT_TEST(cmd, \
35 BT_VS_CMD_BIT_SUP_FEAT)
36#define BT_VS_CMD_READ_STATIC_ADDRS(cmd) BT_LE_FEAT_TEST(cmd, \
37 BT_VS_CMD_BIT_READ_STATIC_ADDRS)
38#define BT_VS_CMD_READ_KEY_ROOTS(cmd) BT_LE_FEAT_TEST(cmd, \
39 BT_VS_CMD_BIT_READ_KEY_ROOTS)
40
41#define BT_HCI_VS_HW_PLAT_INTEL 0x0001
42#define BT_HCI_VS_HW_PLAT_NORDIC 0x0002
43#define BT_HCI_VS_HW_PLAT_NXP 0x0003
44
45#define BT_HCI_VS_HW_VAR_NORDIC_NRF51X 0x0001
46#define BT_HCI_VS_HW_VAR_NORDIC_NRF52X 0x0002
47#define BT_HCI_VS_HW_VAR_NORDIC_NRF53X 0x0003
48
49#define BT_HCI_VS_FW_VAR_STANDARD_CTLR 0x0001
50#define BT_HCI_VS_FW_VAR_VS_CTLR 0x0002
51#define BT_HCI_VS_FW_VAR_FW_LOADER 0x0003
52#define BT_HCI_VS_FW_VAR_RESCUE_IMG 0x0004
53#define BT_HCI_OP_VS_READ_VERSION_INFO BT_OP(BT_OGF_VS, 0x0001)
62} __packed;
63
64#define BT_HCI_OP_VS_READ_SUPPORTED_COMMANDS BT_OP(BT_OGF_VS, 0x0002)
68} __packed;
69
70#define BT_HCI_OP_VS_READ_SUPPORTED_FEATURES BT_OP(BT_OGF_VS, 0x0003)
74} __packed;
75
76#define BT_HCI_OP_VS_SET_EVENT_MASK BT_OP(BT_OGF_VS, 0x0004)
79} __packed;
80
81#define BT_HCI_VS_RESET_SOFT 0x00
82#define BT_HCI_VS_RESET_HARD 0x01
83#define BT_HCI_OP_VS_RESET BT_OP(BT_OGF_VS, 0x0005)
86} __packed;
87
88#define BT_HCI_OP_VS_WRITE_BD_ADDR BT_OP(BT_OGF_VS, 0x0006)
91} __packed;
92
93#define BT_HCI_VS_TRACE_DISABLED 0x00
94#define BT_HCI_VS_TRACE_ENABLED 0x01
95
96#define BT_HCI_VS_TRACE_HCI_EVTS 0x00
97#define BT_HCI_VS_TRACE_VDC 0x01
98#define BT_HCI_OP_VS_SET_TRACE_ENABLE BT_OP(BT_OGF_VS, 0x0007)
102} __packed;
103
104#define BT_HCI_OP_VS_READ_BUILD_INFO BT_OP(BT_OGF_VS, 0x0008)
108} __packed;
109
113} __packed;
114
115#define BT_HCI_OP_VS_READ_STATIC_ADDRS BT_OP(BT_OGF_VS, 0x0009)
120} __packed;
121
122#define BT_HCI_OP_VS_READ_KEY_HIERARCHY_ROOTS BT_OP(BT_OGF_VS, 0x000a)
127} __packed;
128
129#define BT_HCI_OP_VS_READ_CHIP_TEMP BT_OP(BT_OGF_VS, 0x000b)
133} __packed;
134
138} __packed;
139
140#define BT_HCI_VS_VID_ANDROID 0x0001
141#define BT_HCI_VS_VID_MICROSOFT 0x0002
142#define BT_HCI_OP_VS_READ_HOST_STACK_CMDS BT_OP(BT_OGF_VS, 0x000c)
146 struct bt_hci_vs_cmd c[0];
147} __packed;
148
149#define BT_HCI_VS_SCAN_REQ_REPORTS_DISABLED 0x00
150#define BT_HCI_VS_SCAN_REQ_REPORTS_ENABLED 0x01
151#define BT_HCI_OP_VS_SET_SCAN_REQ_REPORTS BT_OP(BT_OGF_VS, 0x000d)
154} __packed;
155
156#define BT_HCI_VS_LL_HANDLE_TYPE_ADV 0x00
157#define BT_HCI_VS_LL_HANDLE_TYPE_SCAN 0x01
158#define BT_HCI_VS_LL_HANDLE_TYPE_CONN 0x02
159#define BT_HCI_VS_LL_TX_POWER_LEVEL_NO_PREF 0x7F
160#define BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL BT_OP(BT_OGF_VS, 0x000e)
165} __packed;
166
172} __packed;
173
174#define BT_HCI_OP_VS_READ_TX_POWER_LEVEL BT_OP(BT_OGF_VS, 0x000f)
178} __packed;
179
185} __packed;
186
187#define BT_HCI_OP_VS_READ_USB_TRANSPORT_MODE BT_OP(BT_OGF_VS, 0x0010)
188
193} __packed;
194
195#define BT_HCI_VS_USB_H2_MODE 0x00
196#define BT_HCI_VS_USB_H4_MODE 0x01
197
198#define BT_HCI_OP_VS_SET_USB_TRANSPORT_MODE BT_OP(BT_OGF_VS, 0x0011)
199
202} __packed;
203
204/* Events */
205
208} __packed;
209
210#define BT_HCI_EVT_VS_FATAL_ERROR 0x02
214} __packed;
215
216#define BT_HCI_VS_TRACE_LMP_TX 0x01
217#define BT_HCI_VS_TRACE_LMP_RX 0x02
218#define BT_HCI_VS_TRACE_LLCP_TX 0x03
219#define BT_HCI_VS_TRACE_LLCP_RX 0x04
220#define BT_HCI_VS_TRACE_LE_CONN_IND 0x05
221#define BT_HCI_EVT_VS_TRACE_INFO 0x03
225} __packed;
226
227#define BT_HCI_EVT_VS_SCAN_REQ_RX 0x04
231} __packed;
232
233/* Event mask bits */
234
235#define BT_EVT_MASK_VS_FATAL_ERROR BT_EVT_BIT(1)
236#define BT_EVT_MASK_VS_TRACE_INFO BT_EVT_BIT(2)
237#define BT_EVT_MASK_VS_SCAN_REQ_RX BT_EVT_BIT(3)
238
239/* Mesh HCI commands */
240#define BT_HCI_MESH_REVISION 0x01
241
242#define BT_HCI_OP_VS_MESH BT_OP(BT_OGF_VS, 0x0042)
243#define BT_HCI_MESH_EVT_PREFIX 0xF0
244
247} __packed;
248
249#define BT_HCI_OC_MESH_GET_OPTS 0x00
263} __packed;
264
265#define BT_HCI_MESH_PATTERN_LEN_MAX 0x0f
266
267#define BT_HCI_OC_MESH_SET_SCAN_FILTER 0x01
271} __packed;
272
278} __packed;
283} __packed;
284
285#define BT_HCI_OC_MESH_ADVERTISE 0x02
301} __packed;
306} __packed;
307
308#define BT_HCI_OC_MESH_ADVERTISE_TIMED 0x03
322} __packed;
327} __packed;
328
329#define BT_HCI_OC_MESH_ADVERTISE_CANCEL 0x04
332} __packed;
337} __packed;
338
339#define BT_HCI_OC_MESH_SET_SCANNING 0x05
344} __packed;
348} __packed;
349
350/* Events */
354} __packed;
355
356#define BT_HCI_EVT_MESH_ADV_COMPLETE 0x00
359} __packed;
360
361#define BT_HCI_EVT_MESH_SCANNING_REPORT 0x01
369} __packed;
373} __packed;
374
375#ifdef __cplusplus
376}
377#endif
378
379#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HCI_VS_H_ */
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
__UINT64_TYPE__ uint64_t
Definition: stdint.h:61
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
__UINT16_TYPE__ uint16_t
Definition: stdint.h:59
__INT8_TYPE__ int8_t
Definition: stdint.h:42
Definition: addr.h:39
Definition: addr.h:34
Definition: hci_vs.h:330
uint8_t adv_slot
Definition: hci_vs.h:331
Definition: hci_vs.h:309
uint16_t tx_window
Definition: hci_vs.h:319
uint8_t retx_interval
Definition: hci_vs.h:316
uint8_t data_len
Definition: hci_vs.h:320
uint32_t instant
Definition: hci_vs.h:317
uint8_t adv_slot
Definition: hci_vs.h:310
uint8_t ch_map
Definition: hci_vs.h:313
int8_t tx_power
Definition: hci_vs.h:314
uint8_t data[31]
Definition: hci_vs.h:321
bt_addr_t random_addr
Definition: hci_vs.h:312
uint8_t retx_count
Definition: hci_vs.h:315
uint8_t own_addr_type
Definition: hci_vs.h:311
uint16_t tx_delay
Definition: hci_vs.h:318
Definition: hci_vs.h:286
uint8_t scan_filter
Definition: hci_vs.h:298
bt_addr_t random_addr
Definition: hci_vs.h:289
uint8_t scan_delay
Definition: hci_vs.h:296
uint8_t max_tx_delay
Definition: hci_vs.h:293
uint8_t retx_interval
Definition: hci_vs.h:295
uint8_t retx_count
Definition: hci_vs.h:294
uint8_t data_len
Definition: hci_vs.h:299
uint8_t min_tx_delay
Definition: hci_vs.h:292
uint8_t own_addr_type
Definition: hci_vs.h:288
uint8_t adv_slot
Definition: hci_vs.h:287
uint8_t ch_map
Definition: hci_vs.h:290
uint16_t scan_duration
Definition: hci_vs.h:297
uint8_t data[31]
Definition: hci_vs.h:300
int8_t tx_power
Definition: hci_vs.h:291
Definition: hci_vs.h:273
uint8_t num_patterns
Definition: hci_vs.h:276
uint8_t filter_dup
Definition: hci_vs.h:275
struct bt_hci_mesh_pattern patterns[0]
Definition: hci_vs.h:277
uint8_t scan_filter
Definition: hci_vs.h:274
Definition: hci_vs.h:340
uint8_t ch_map
Definition: hci_vs.h:342
uint8_t scan_filter
Definition: hci_vs.h:343
uint8_t enable
Definition: hci_vs.h:341
Definition: hci_vs.h:245
uint8_t opcode
Definition: hci_vs.h:246
Definition: hci_vs.h:175
uint16_t handle
Definition: hci_vs.h:177
uint8_t handle_type
Definition: hci_vs.h:176
Definition: hci_vs.h:84
uint8_t type
Definition: hci_vs.h:85
Definition: hci_vs.h:77
uint8_t event_mask[8]
Definition: hci_vs.h:78
Definition: hci_vs.h:152
uint8_t enable
Definition: hci_vs.h:153
Definition: hci_vs.h:99
uint8_t type
Definition: hci_vs.h:101
uint8_t enable
Definition: hci_vs.h:100
Definition: hci_vs.h:200
uint8_t mode
Definition: hci_vs.h:201
Definition: hci_vs.h:89
bt_addr_t bdaddr
Definition: hci_vs.h:90
Definition: hci_vs.h:161
uint8_t handle_type
Definition: hci_vs.h:162
int8_t tx_power_level
Definition: hci_vs.h:164
uint16_t handle
Definition: hci_vs.h:163
Definition: hci_vs.h:357
uint8_t adv_slot
Definition: hci_vs.h:358
Definition: hci_vs.h:362
bt_addr_le_t addr
Definition: hci_vs.h:363
uint8_t data_len
Definition: hci_vs.h:367
uint8_t chan
Definition: hci_vs.h:364
uint8_t data[0]
Definition: hci_vs.h:368
uint32_t instant
Definition: hci_vs.h:366
int8_t rssi
Definition: hci_vs.h:365
Definition: hci_vs.h:370
uint8_t num_reports
Definition: hci_vs.h:371
struct bt_hci_evt_mesh_scan_report reports[0]
Definition: hci_vs.h:372
Definition: hci_vs.h:351
uint8_t prefix
Definition: hci_vs.h:352
uint8_t subevent
Definition: hci_vs.h:353
Definition: hci_vs.h:211
uint8_t err_info[0]
Definition: hci_vs.h:213
uint64_t pc
Definition: hci_vs.h:212
Definition: hci_vs.h:228
bt_addr_le_t addr
Definition: hci_vs.h:229
int8_t rssi
Definition: hci_vs.h:230
Definition: hci_vs.h:222
uint8_t data[0]
Definition: hci_vs.h:224
uint8_t type
Definition: hci_vs.h:223
Definition: hci_vs.h:206
uint8_t subevent
Definition: hci_vs.h:207
Definition: hci_vs.h:268
uint8_t pattern_len
Definition: hci_vs.h:269
uint8_t pattern[0]
Definition: hci_vs.h:270
Definition: hci_vs.h:333
uint8_t opcode
Definition: hci_vs.h:335
uint8_t status
Definition: hci_vs.h:334
uint8_t adv_slot
Definition: hci_vs.h:336
Definition: hci_vs.h:323
uint8_t opcode
Definition: hci_vs.h:325
uint8_t adv_slot
Definition: hci_vs.h:326
uint8_t status
Definition: hci_vs.h:324
Definition: hci_vs.h:302
uint8_t adv_slot
Definition: hci_vs.h:305
uint8_t status
Definition: hci_vs.h:303
uint8_t opcode
Definition: hci_vs.h:304
Definition: hci_vs.h:250
uint8_t ch_map
Definition: hci_vs.h:254
uint8_t max_adv_slot
Definition: hci_vs.h:259
uint8_t max_filter_pattern
Definition: hci_vs.h:258
uint8_t opcode
Definition: hci_vs.h:252
uint8_t max_tx_window
Definition: hci_vs.h:260
uint8_t status
Definition: hci_vs.h:251
uint8_t max_scan_filter
Definition: hci_vs.h:257
int8_t min_tx_power
Definition: hci_vs.h:255
uint8_t revision
Definition: hci_vs.h:253
int8_t max_tx_power
Definition: hci_vs.h:256
uint8_t evt_prefix
Definition: hci_vs.h:262
uint8_t evt_prefix_len
Definition: hci_vs.h:261
Definition: hci_vs.h:279
uint8_t opcode
Definition: hci_vs.h:281
uint8_t status
Definition: hci_vs.h:280
uint8_t scan_filter
Definition: hci_vs.h:282
Definition: hci_vs.h:345
uint8_t opcode
Definition: hci_vs.h:347
uint8_t status
Definition: hci_vs.h:346
Definition: hci_vs.h:105
uint8_t info[0]
Definition: hci_vs.h:107
uint8_t status
Definition: hci_vs.h:106
Definition: hci_vs.h:130
int8_t temps
Definition: hci_vs.h:132
uint8_t status
Definition: hci_vs.h:131
Definition: hci_vs.h:143
struct bt_hci_vs_cmd c[0]
Definition: hci_vs.h:146
uint8_t status
Definition: hci_vs.h:144
uint8_t num_cmds
Definition: hci_vs.h:145
uint8_t status
Definition: hci_vs.h:124
uint8_t ir[16]
Definition: hci_vs.h:125
uint8_t er[16]
Definition: hci_vs.h:126
Definition: hci_vs.h:116
uint8_t num_addrs
Definition: hci_vs.h:118
uint8_t status
Definition: hci_vs.h:117
struct bt_hci_vs_static_addr a[0]
Definition: hci_vs.h:119
uint8_t commands[64]
Definition: hci_vs.h:67
uint8_t status
Definition: hci_vs.h:66
uint8_t features[8]
Definition: hci_vs.h:73
uint8_t status
Definition: hci_vs.h:72
Definition: hci_vs.h:180
uint8_t handle_type
Definition: hci_vs.h:182
int8_t tx_power_level
Definition: hci_vs.h:184
uint16_t handle
Definition: hci_vs.h:183
uint8_t status
Definition: hci_vs.h:181
Definition: hci_vs.h:189
uint8_t num_supported_modes
Definition: hci_vs.h:191
uint8_t status
Definition: hci_vs.h:190
uint8_t supported_mode[0]
Definition: hci_vs.h:192
Definition: hci_vs.h:54
uint8_t fw_version
Definition: hci_vs.h:59
uint8_t fw_variant
Definition: hci_vs.h:58
uint32_t fw_build
Definition: hci_vs.h:61
uint16_t fw_revision
Definition: hci_vs.h:60
uint8_t status
Definition: hci_vs.h:55
uint16_t hw_platform
Definition: hci_vs.h:56
uint16_t hw_variant
Definition: hci_vs.h:57
Definition: hci_vs.h:167
uint8_t handle_type
Definition: hci_vs.h:169
uint8_t status
Definition: hci_vs.h:168
int8_t selected_tx_power
Definition: hci_vs.h:171
uint16_t handle
Definition: hci_vs.h:170
Definition: hci_vs.h:135
uint16_t opcode_base
Definition: hci_vs.h:137
uint16_t vendor_id
Definition: hci_vs.h:136
Definition: hci_vs.h:110
bt_addr_t bdaddr
Definition: hci_vs.h:111
uint8_t ir[16]
Definition: hci_vs.h:112