Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
hci_raw.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2016 Intel Corporation
7 *
8 * SPDX-License-Identifier: Apache-2.0
9 */
10#ifndef ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_
11#define ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_
12
20#include <stdint.h>
21#include <stddef.h>
22
23#include <zephyr/kernel.h>
24#include <zephyr/net_buf.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
39int bt_send(struct net_buf *buf);
40
41enum {
48
56};
57
67
75
76#define BT_HCI_ERR_EXT_HANDLED 0xff
77
84#define BT_HCI_RAW_CMD_EXT(_op, _min_len, _func) \
85 { \
86 .op = _op, \
87 .min_len = _min_len, \
88 .func = _func, \
89 }
90
94
96 size_t min_len;
97
109 uint8_t (*func)(struct net_buf *buf);
110};
111
121
132int bt_enable_raw(struct k_fifo *rx_queue);
133
134#ifdef __cplusplus
135}
136#endif
141#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_ */
int bt_send(struct net_buf *buf)
Send packet to the Bluetooth controller.
void bt_hci_raw_cmd_ext_register(struct bt_hci_raw_cmd_ext *cmds, size_t size)
Register Bluetooth RAW command extension table.
uint8_t bt_hci_raw_get_mode(void)
Get Bluetooth RAW channel mode.
int bt_enable_raw(struct k_fifo *rx_queue)
Enable Bluetooth RAW channel:
int bt_hci_raw_set_mode(uint8_t mode)
Set Bluetooth RAW channel mode.
@ BT_HCI_RAW_MODE_H4
H:4 mode.
Definition hci_raw.h:55
@ BT_HCI_RAW_MODE_PASSTHROUGH
Passthrough mode.
Definition hci_raw.h:47
Public kernel APIs.
Buffer management.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Definition hci_raw.h:91
size_t min_len
Minimal length of the command.
Definition hci_raw.h:96
uint8_t(* func)(struct net_buf *buf)
Handler function.
Definition hci_raw.h:109
uint16_t op
Opcode of the command.
Definition hci_raw.h:93
Definition kernel.h:2524
Network buffer representation.
Definition net_buf.h:1006
uint16_t size
Amount of data that this buffer can store.
Definition net_buf.h:1038