Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
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 <stdint.h>
13
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#define BT_VS_CMD_BIT_VERSION 0
21#define BT_VS_CMD_BIT_SUP_CMD 1
22#define BT_VS_CMD_BIT_SUP_FEAT 2
23#define BT_VS_CMD_BIT_SET_EVT_MASK 3
24#define BT_VS_CMD_BIT_RESET 4
25#define BT_VS_CMD_BIT_WRITE_BDADDR 5
26#define BT_VS_CMD_BIT_SET_TRACE_ENABLE 6
27#define BT_VS_CMD_BIT_READ_BUILD_INFO 7
28#define BT_VS_CMD_BIT_READ_STATIC_ADDRS 8
29#define BT_VS_CMD_BIT_READ_KEY_ROOTS 9
30#define BT_VS_CMD_BIT_READ_CHIP_TEMP 10
31#define BT_VS_CMD_BIT_READ_HOST_STACK_CMD 11
32#define BT_VS_CMD_BIT_SET_SCAN_REP_ENABLE 12
33#define BT_VS_CMD_BIT_WRITE_TX_POWER 13
34#define BT_VS_CMD_BIT_READ_TX_POWER 14
35
36#define BT_VS_CMD_SUP_FEAT(cmd) BT_LE_FEAT_TEST(cmd, \
37 BT_VS_CMD_BIT_SUP_FEAT)
38#define BT_VS_CMD_READ_STATIC_ADDRS(cmd) BT_LE_FEAT_TEST(cmd, \
39 BT_VS_CMD_BIT_READ_STATIC_ADDRS)
40#define BT_VS_CMD_READ_KEY_ROOTS(cmd) BT_LE_FEAT_TEST(cmd, \
41 BT_VS_CMD_BIT_READ_KEY_ROOTS)
42
43#define BT_HCI_VS_HW_PLAT_INTEL 0x0001
44#define BT_HCI_VS_HW_PLAT_NORDIC 0x0002
45#define BT_HCI_VS_HW_PLAT_NXP 0x0003
46
47#define BT_HCI_VS_HW_VAR_NORDIC_NRF51X 0x0001
48#define BT_HCI_VS_HW_VAR_NORDIC_NRF52X 0x0002
49#define BT_HCI_VS_HW_VAR_NORDIC_NRF53X 0x0003
50#define BT_HCI_VS_HW_VAR_NORDIC_NRF54HX 0x0004
51#define BT_HCI_VS_HW_VAR_NORDIC_NRF54LX 0x0005
52
53#define BT_HCI_VS_FW_VAR_STANDARD_CTLR 0x0001
54#define BT_HCI_VS_FW_VAR_VS_CTLR 0x0002
55#define BT_HCI_VS_FW_VAR_FW_LOADER 0x0003
56#define BT_HCI_VS_FW_VAR_RESCUE_IMG 0x0004
57#define BT_HCI_OP_VS_READ_VERSION_INFO BT_OP(BT_OGF_VS, 0x0001)
67
68#define BT_HCI_OP_VS_READ_SUPPORTED_COMMANDS BT_OP(BT_OGF_VS, 0x0002)
73
74#define BT_HCI_OP_VS_READ_SUPPORTED_FEATURES BT_OP(BT_OGF_VS, 0x0003)
79
80#define BT_HCI_OP_VS_SET_EVENT_MASK BT_OP(BT_OGF_VS, 0x0004)
84
85#define BT_HCI_VS_RESET_SOFT 0x00
86#define BT_HCI_VS_RESET_HARD 0x01
87#define BT_HCI_OP_VS_RESET BT_OP(BT_OGF_VS, 0x0005)
90} __packed;
91
92#define BT_HCI_OP_VS_WRITE_BD_ADDR BT_OP(BT_OGF_VS, 0x0006)
96
97#define BT_HCI_VS_TRACE_DISABLED 0x00
98#define BT_HCI_VS_TRACE_ENABLED 0x01
99
100#define BT_HCI_VS_TRACE_HCI_EVTS 0x00
101#define BT_HCI_VS_TRACE_VDC 0x01
102#define BT_HCI_OP_VS_SET_TRACE_ENABLE BT_OP(BT_OGF_VS, 0x0007)
107
108#define BT_HCI_OP_VS_READ_BUILD_INFO BT_OP(BT_OGF_VS, 0x0008)
113
118
119#define BT_HCI_OP_VS_READ_STATIC_ADDRS BT_OP(BT_OGF_VS, 0x0009)
125
126#define BT_HCI_OP_VS_READ_KEY_HIERARCHY_ROOTS BT_OP(BT_OGF_VS, 0x000a)
132
133#define BT_HCI_OP_VS_READ_CHIP_TEMP BT_OP(BT_OGF_VS, 0x000b)
138
143
144#define BT_HCI_VS_VID_ANDROID 0x0001
145#define BT_HCI_VS_VID_MICROSOFT 0x0002
146#define BT_HCI_OP_VS_READ_HOST_STACK_CMDS BT_OP(BT_OGF_VS, 0x000c)
152
153#define BT_HCI_VS_SCAN_REQ_REPORTS_DISABLED 0x00
154#define BT_HCI_VS_SCAN_REQ_REPORTS_ENABLED 0x01
155#define BT_HCI_OP_VS_SET_SCAN_REQ_REPORTS BT_OP(BT_OGF_VS, 0x000d)
159
160#define BT_HCI_VS_LL_HANDLE_TYPE_ADV 0x00
161#define BT_HCI_VS_LL_HANDLE_TYPE_SCAN 0x01
162#define BT_HCI_VS_LL_HANDLE_TYPE_CONN 0x02
163#define BT_HCI_VS_LL_TX_POWER_LEVEL_NO_PREF 0x7F
164#define BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL BT_OP(BT_OGF_VS, 0x000e)
170
177
178#define BT_HCI_OP_VS_READ_TX_POWER_LEVEL BT_OP(BT_OGF_VS, 0x000f)
183
190
191#define BT_HCI_OP_VS_READ_USB_TRANSPORT_MODE BT_OP(BT_OGF_VS, 0x0010)
192
198
199#define BT_HCI_VS_USB_H2_MODE 0x00
200#define BT_HCI_VS_USB_H4_MODE 0x01
201
202#define BT_HCI_OP_VS_SET_USB_TRANSPORT_MODE BT_OP(BT_OGF_VS, 0x0011)
203
207
208#define BT_HCI_OP_VS_SET_MIN_NUM_USED_CHANS BT_OP(BT_OGF_VS, 0x0012)
209
215
216/* Events */
217
220} __packed;
221
222#define BT_HCI_EVT_VS_FATAL_ERROR 0x02
223
224#define BT_HCI_EVT_VS_ERROR_DATA_TYPE_STACK_FRAME 0x01
225#define BT_HCI_EVT_VS_ERROR_DATA_TYPE_CTRL_ASSERT 0x02
226#define BT_HCI_EVT_VS_ERROR_DATA_TYPE_TRACE 0x03
236#define BT_HCI_EVT_VS_ERROR_CPU_TYPE_CORTEX_M 0x01
242
247
252
253#define BT_HCI_VS_TRACE_LMP_TX 0x01
254#define BT_HCI_VS_TRACE_LMP_RX 0x02
255#define BT_HCI_VS_TRACE_LLCP_TX 0x03
256#define BT_HCI_VS_TRACE_LLCP_RX 0x04
257#define BT_HCI_VS_TRACE_LE_CONN_IND 0x05
258#define BT_HCI_EVT_VS_TRACE_INFO 0x03
263
264#define BT_HCI_EVT_VS_SCAN_REQ_RX 0x04
269
274
275#define BT_HCI_EVT_VS_LE_CONNECTIONLESS_IQ_REPORT 0x5
276#define BT_HCI_VS_LE_CTE_REPORT_NO_VALID_SAMPLE 0x8000
289
290#define BT_HCI_EVT_VS_LE_CONNECTION_IQ_REPORT 0x6
304
305/* Event mask bits */
306
307#define BT_EVT_MASK_VS_FATAL_ERROR BT_EVT_BIT(1)
308#define BT_EVT_MASK_VS_TRACE_INFO BT_EVT_BIT(2)
309#define BT_EVT_MASK_VS_SCAN_REQ_RX BT_EVT_BIT(3)
310#define BT_EVT_MASK_VS_LE_CONNECTIONLESS_IQ_REPORT BT_EVT_BIT(4)
311#define BT_EVT_MASK_VS_LE_CONNECTION_IQ_REPORT BT_EVT_BIT(5)
312
313#define DEFAULT_VS_EVT_MASK \
314 BT_EVT_MASK_VS_FATAL_ERROR | BT_EVT_MASK_VS_TRACE_INFO | BT_EVT_MASK_VS_SCAN_REQ_RX | \
315 BT_EVT_MASK_VS_LE_CONNECTIONLESS_IQ_REPORT | \
316 BT_EVT_MASK_VS_LE_CONNECTION_IQ_REPORT
317
318/* Mesh HCI commands */
319#define BT_HCI_MESH_REVISION 0x01
320
321#define BT_HCI_OP_VS_MESH BT_OP(BT_OGF_VS, 0x0042)
322#define BT_HCI_MESH_EVT_PREFIX 0xF0
323
326} __packed;
327
328#define BT_HCI_OC_MESH_GET_OPTS 0x00
343
344#define BT_HCI_MESH_PATTERN_LEN_MAX 0x0f
345
346#define BT_HCI_OC_MESH_SET_SCAN_FILTER 0x01
351
363
364#define BT_HCI_OC_MESH_ADVERTISE 0x02
386
387#define BT_HCI_OC_MESH_ADVERTISE_TIMED 0x03
407
408#define BT_HCI_OC_MESH_ADVERTISE_CANCEL 0x04
417
418#define BT_HCI_OC_MESH_SET_SCANNING 0x05
428
429/* Events */
434
435#define BT_HCI_EVT_MESH_ADV_COMPLETE 0x00
439
440#define BT_HCI_EVT_MESH_SCANNING_REPORT 0x01
453
454struct net_buf *hci_vs_err_stack_frame(unsigned int reason, const struct arch_esf *esf);
455struct net_buf *hci_vs_err_trace(const char *file, uint32_t line, uint64_t pc);
456struct net_buf *hci_vs_err_assert(const char *file, uint32_t line);
457
458#ifdef __cplusplus
459}
460#endif
461
462#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HCI_VS_H_ */
struct net_buf * hci_vs_err_trace(const char *file, uint32_t line, uint64_t pc)
struct net_buf * hci_vs_err_stack_frame(unsigned int reason, const struct arch_esf *esf)
struct net_buf * hci_vs_err_assert(const char *file, uint32_t line)
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT8_TYPE__ int8_t
Definition stdint.h:72
__INT16_TYPE__ int16_t
Definition stdint.h:73
Exception Stack Frame.
Definition exception.h:60
Bluetooth LE Device Address.
Definition addr.h:49
Bluetooth Device Address.
Definition addr.h:40
Definition hci_vs.h:409
uint8_t adv_slot
Definition hci_vs.h:410
Definition hci_vs.h:388
uint16_t tx_window
Definition hci_vs.h:398
uint8_t retx_interval
Definition hci_vs.h:395
uint8_t data_len
Definition hci_vs.h:399
uint32_t instant
Definition hci_vs.h:396
uint8_t adv_slot
Definition hci_vs.h:389
uint8_t ch_map
Definition hci_vs.h:392
int8_t tx_power
Definition hci_vs.h:393
uint8_t data[31]
Definition hci_vs.h:400
bt_addr_t random_addr
Definition hci_vs.h:391
uint8_t retx_count
Definition hci_vs.h:394
uint8_t own_addr_type
Definition hci_vs.h:390
uint16_t tx_delay
Definition hci_vs.h:397
Definition hci_vs.h:365
uint8_t scan_filter
Definition hci_vs.h:377
bt_addr_t random_addr
Definition hci_vs.h:368
uint8_t scan_delay
Definition hci_vs.h:375
uint8_t max_tx_delay
Definition hci_vs.h:372
uint8_t retx_interval
Definition hci_vs.h:374
uint8_t retx_count
Definition hci_vs.h:373
uint8_t data_len
Definition hci_vs.h:378
uint8_t min_tx_delay
Definition hci_vs.h:371
uint8_t own_addr_type
Definition hci_vs.h:367
uint8_t adv_slot
Definition hci_vs.h:366
uint8_t ch_map
Definition hci_vs.h:369
uint16_t scan_duration
Definition hci_vs.h:376
uint8_t data[31]
Definition hci_vs.h:379
int8_t tx_power
Definition hci_vs.h:370
Definition hci_vs.h:352
uint8_t num_patterns
Definition hci_vs.h:355
uint8_t filter_dup
Definition hci_vs.h:354
struct bt_hci_mesh_pattern patterns[0]
Definition hci_vs.h:356
uint8_t scan_filter
Definition hci_vs.h:353
Definition hci_vs.h:419
uint8_t ch_map
Definition hci_vs.h:421
uint8_t scan_filter
Definition hci_vs.h:422
uint8_t enable
Definition hci_vs.h:420
Definition hci_vs.h:324
uint8_t opcode
Definition hci_vs.h:325
Definition hci_vs.h:179
uint16_t handle
Definition hci_vs.h:181
uint8_t handle_type
Definition hci_vs.h:180
Definition hci_vs.h:88
uint8_t type
Definition hci_vs.h:89
Definition hci_vs.h:81
uint8_t event_mask[8]
Definition hci_vs.h:82
uint8_t min_used_chans
Definition hci_vs.h:213
uint8_t phys
Definition hci_vs.h:212
uint16_t handle
Definition hci_vs.h:211
Definition hci_vs.h:156
uint8_t enable
Definition hci_vs.h:157
Definition hci_vs.h:103
uint8_t type
Definition hci_vs.h:105
uint8_t enable
Definition hci_vs.h:104
uint8_t mode
Definition hci_vs.h:205
Definition hci_vs.h:93
bt_addr_t bdaddr
Definition hci_vs.h:94
Definition hci_vs.h:165
uint8_t handle_type
Definition hci_vs.h:166
int8_t tx_power_level
Definition hci_vs.h:168
uint16_t handle
Definition hci_vs.h:167
Definition hci_vs.h:436
uint8_t adv_slot
Definition hci_vs.h:437
Definition hci_vs.h:441
bt_addr_le_t addr
Definition hci_vs.h:442
uint8_t data_len
Definition hci_vs.h:446
uint8_t chan
Definition hci_vs.h:443
uint8_t data[0]
Definition hci_vs.h:447
uint32_t instant
Definition hci_vs.h:445
int8_t rssi
Definition hci_vs.h:444
Definition hci_vs.h:449
uint8_t num_reports
Definition hci_vs.h:450
struct bt_hci_evt_mesh_scan_report reports[0]
Definition hci_vs.h:451
Definition hci_vs.h:430
uint8_t prefix
Definition hci_vs.h:431
uint8_t subevent
Definition hci_vs.h:432
uint64_t pc
Definition hci_vs.h:244
uint8_t err_info[0]
Definition hci_vs.h:245
Definition hci_vs.h:248
uint8_t type
Definition hci_vs.h:249
uint8_t data[0]
Definition hci_vs.h:250
uint8_t rssi_ant_id
Definition hci_vs.h:296
uint8_t slot_durations
Definition hci_vs.h:298
int16_t rssi
Definition hci_vs.h:295
uint16_t conn_handle
Definition hci_vs.h:292
uint8_t rx_phy
Definition hci_vs.h:293
uint8_t packet_status
Definition hci_vs.h:299
uint16_t conn_evt_counter
Definition hci_vs.h:300
uint8_t sample_count
Definition hci_vs.h:301
struct bt_hci_le_iq_sample16 sample[0]
Definition hci_vs.h:302
uint8_t cte_type
Definition hci_vs.h:297
uint8_t data_chan_idx
Definition hci_vs.h:294
struct bt_hci_le_iq_sample16 sample[0]
Definition hci_vs.h:287
uint8_t sample_count
Definition hci_vs.h:286
uint8_t rssi_ant_id
Definition hci_vs.h:281
uint8_t cte_type
Definition hci_vs.h:282
int16_t rssi
Definition hci_vs.h:280
uint16_t sync_handle
Definition hci_vs.h:278
uint16_t per_evt_counter
Definition hci_vs.h:285
uint8_t slot_durations
Definition hci_vs.h:283
uint8_t chan_idx
Definition hci_vs.h:279
uint8_t packet_status
Definition hci_vs.h:284
Definition hci_vs.h:265
bt_addr_le_t addr
Definition hci_vs.h:266
int8_t rssi
Definition hci_vs.h:267
Definition hci_vs.h:259
uint8_t data[0]
Definition hci_vs.h:261
uint8_t type
Definition hci_vs.h:260
Definition hci_vs.h:218
uint8_t subevent
Definition hci_vs.h:219
Definition hci_vs.h:270
int16_t q
Definition hci_vs.h:272
int16_t i
Definition hci_vs.h:271
Definition hci_vs.h:347
uint8_t pattern_len
Definition hci_vs.h:348
uint8_t pattern[0]
Definition hci_vs.h:349
Definition hci_vs.h:412
uint8_t opcode
Definition hci_vs.h:414
uint8_t status
Definition hci_vs.h:413
uint8_t adv_slot
Definition hci_vs.h:415
Definition hci_vs.h:402
uint8_t opcode
Definition hci_vs.h:404
uint8_t adv_slot
Definition hci_vs.h:405
uint8_t status
Definition hci_vs.h:403
Definition hci_vs.h:381
uint8_t adv_slot
Definition hci_vs.h:384
uint8_t status
Definition hci_vs.h:382
uint8_t opcode
Definition hci_vs.h:383
Definition hci_vs.h:329
uint8_t ch_map
Definition hci_vs.h:333
uint8_t max_adv_slot
Definition hci_vs.h:338
uint8_t max_filter_pattern
Definition hci_vs.h:337
uint8_t opcode
Definition hci_vs.h:331
uint8_t max_tx_window
Definition hci_vs.h:339
uint8_t status
Definition hci_vs.h:330
uint8_t max_scan_filter
Definition hci_vs.h:336
int8_t min_tx_power
Definition hci_vs.h:334
uint8_t revision
Definition hci_vs.h:332
int8_t max_tx_power
Definition hci_vs.h:335
uint8_t evt_prefix
Definition hci_vs.h:341
uint8_t evt_prefix_len
Definition hci_vs.h:340
Definition hci_vs.h:358
uint8_t opcode
Definition hci_vs.h:360
uint8_t status
Definition hci_vs.h:359
uint8_t scan_filter
Definition hci_vs.h:361
Definition hci_vs.h:424
uint8_t opcode
Definition hci_vs.h:426
uint8_t status
Definition hci_vs.h:425
Definition hci_vs.h:109
uint8_t info[0]
Definition hci_vs.h:111
uint8_t status
Definition hci_vs.h:110
Definition hci_vs.h:134
int8_t temps
Definition hci_vs.h:136
uint8_t status
Definition hci_vs.h:135
Definition hci_vs.h:147
struct bt_hci_vs_cmd c[0]
Definition hci_vs.h:150
uint8_t status
Definition hci_vs.h:148
uint8_t num_cmds
Definition hci_vs.h:149
uint8_t status
Definition hci_vs.h:128
uint8_t ir[16]
Definition hci_vs.h:129
uint8_t er[16]
Definition hci_vs.h:130
Definition hci_vs.h:120
uint8_t num_addrs
Definition hci_vs.h:122
uint8_t status
Definition hci_vs.h:121
struct bt_hci_vs_static_addr a[0]
Definition hci_vs.h:123
uint8_t commands[64]
Definition hci_vs.h:71
uint8_t status
Definition hci_vs.h:70
uint8_t features[8]
Definition hci_vs.h:77
uint8_t status
Definition hci_vs.h:76
Definition hci_vs.h:184
uint8_t handle_type
Definition hci_vs.h:186
int8_t tx_power_level
Definition hci_vs.h:188
uint16_t handle
Definition hci_vs.h:187
uint8_t status
Definition hci_vs.h:185
uint8_t num_supported_modes
Definition hci_vs.h:195
uint8_t status
Definition hci_vs.h:194
uint8_t supported_mode[0]
Definition hci_vs.h:196
Definition hci_vs.h:58
uint8_t fw_version
Definition hci_vs.h:63
uint8_t fw_variant
Definition hci_vs.h:62
uint32_t fw_build
Definition hci_vs.h:65
uint16_t fw_revision
Definition hci_vs.h:64
uint8_t status
Definition hci_vs.h:59
uint16_t hw_platform
Definition hci_vs.h:60
uint16_t hw_variant
Definition hci_vs.h:61
Definition hci_vs.h:171
uint8_t handle_type
Definition hci_vs.h:173
uint8_t status
Definition hci_vs.h:172
int8_t selected_tx_power
Definition hci_vs.h:175
uint16_t handle
Definition hci_vs.h:174
Definition hci_vs.h:139
uint16_t opcode_base
Definition hci_vs.h:141
uint16_t vendor_id
Definition hci_vs.h:140
uint32_t ip
Definition hci_vs.h:232
uint32_t a4
Definition hci_vs.h:231
uint32_t a3
Definition hci_vs.h:230
uint32_t xpsr
Definition hci_vs.h:234
uint32_t a2
Definition hci_vs.h:229
uint32_t lr
Definition hci_vs.h:233
uint32_t a1
Definition hci_vs.h:228
Definition hci_vs.h:237
uint8_t cpu_type
Definition hci_vs.h:239
uint8_t cpu_data[0]
Definition hci_vs.h:240
uint32_t reason
Definition hci_vs.h:238
Definition hci_vs.h:114
bt_addr_t bdaddr
Definition hci_vs.h:115
uint8_t ir[16]
Definition hci_vs.h:116
Network buffer representation.
Definition net_buf.h:1006