Line data Source code
1 1 : /** @file
2 : * @brief Bluetooth HCI RAW channel handling
3 : */
4 :
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 :
13 : /**
14 : * @brief HCI RAW channel
15 : * @defgroup hci_raw HCI RAW channel
16 : * @ingroup bluetooth
17 : * @{
18 : */
19 :
20 : #include <stdint.h>
21 : #include <stddef.h>
22 :
23 : #include <zephyr/kernel.h>
24 : #include <zephyr/net_buf.h>
25 :
26 : #ifdef __cplusplus
27 : extern "C" {
28 : #endif
29 :
30 : /** @brief Send packet to the Bluetooth controller
31 : *
32 : * Send packet to the Bluetooth controller. The buffers should be allocated using
33 : * bt_buf_get_tx().
34 : *
35 : * @param buf HCI packet to be sent.
36 : *
37 : * @return Zero on success or (negative) error code otherwise.
38 : */
39 1 : int bt_send(struct net_buf *buf);
40 :
41 : /** @brief Enable Bluetooth RAW channel:
42 : *
43 : * Enable Bluetooth RAW HCI channel.
44 : *
45 : * @param rx_queue netbuf queue where HCI packets received from the Bluetooth
46 : * controller are to be queued. The queue is defined in the caller while
47 : * the available buffers pools are handled in the stack.
48 : *
49 : * @return Zero on success or (negative) error code otherwise.
50 : */
51 1 : int bt_enable_raw(struct k_fifo *rx_queue);
52 :
53 : #ifdef __cplusplus
54 : }
55 : #endif
56 : /**
57 : * @}
58 : */
59 :
60 : #endif /* ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_ */
|