Andrei Emeltchenko | 2b12ca8 | 2016-08-17 11:33:04 +0300 | [diff] [blame] | 1 | /** @file |
| 2 | * @brief Bluetooth HCI RAW channel handling |
| 3 | */ |
Andrei Emeltchenko | 6ab1b9c | 2016-08-09 11:13:52 +0300 | [diff] [blame] | 4 | |
| 5 | /* |
| 6 | * Copyright (c) 2016 Intel Corporation |
| 7 | * |
David B. Kinder | ac74d8b | 2017-01-18 17:01:01 -0800 | [diff] [blame] | 8 | * SPDX-License-Identifier: Apache-2.0 |
Andrei Emeltchenko | 6ab1b9c | 2016-08-09 11:13:52 +0300 | [diff] [blame] | 9 | */ |
Flavio Ceolin | 67ca176 | 2018-09-14 10:43:44 -0700 | [diff] [blame] | 10 | #ifndef ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_ |
| 11 | #define ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_ |
Andrei Emeltchenko | 6ab1b9c | 2016-08-09 11:13:52 +0300 | [diff] [blame] | 12 | |
Andrei Emeltchenko | 2b12ca8 | 2016-08-17 11:33:04 +0300 | [diff] [blame] | 13 | /** |
| 14 | * @brief HCI RAW channel |
| 15 | * @defgroup hci_raw HCI RAW channel |
| 16 | * @ingroup bluetooth |
| 17 | * @{ |
| 18 | */ |
| 19 | |
Johan Hedberg | d0504ff | 2016-08-19 14:58:11 +0300 | [diff] [blame] | 20 | #ifdef __cplusplus |
| 21 | extern "C" { |
| 22 | #endif |
| 23 | |
Andrei Emeltchenko | 2b12ca8 | 2016-08-17 11:33:04 +0300 | [diff] [blame] | 24 | /** @brief Send packet to the Bluetooth controller |
| 25 | * |
| 26 | * Send packet to the Bluetooth controller. Caller needs to |
| 27 | * implement netbuf pool. |
| 28 | * |
| 29 | * @param buf netbuf packet to be send |
| 30 | * |
| 31 | * @return Zero on success or (negative) error code otherwise. |
| 32 | */ |
Andrei Emeltchenko | 6ab1b9c | 2016-08-09 11:13:52 +0300 | [diff] [blame] | 33 | int bt_send(struct net_buf *buf); |
Andrei Emeltchenko | 2b12ca8 | 2016-08-17 11:33:04 +0300 | [diff] [blame] | 34 | |
| 35 | /** @brief Enable Bluetooth RAW channel |
| 36 | * |
| 37 | * Enable Bluetooth RAW HCI channel. |
| 38 | * |
| 39 | * @param rx_queue netbuf queue where HCI packets received from the Bluetooth |
| 40 | * controller are to be queued. The queue is defined in the caller while |
| 41 | * the available buffers pools are handled in the stack. |
| 42 | * |
| 43 | * @return Zero on success or (negative) error code otherwise. |
| 44 | */ |
Szymon Janc | 47eaaf9 | 2016-11-10 10:45:10 +0100 | [diff] [blame] | 45 | int bt_enable_raw(struct k_fifo *rx_queue); |
Andrei Emeltchenko | 2b12ca8 | 2016-08-17 11:33:04 +0300 | [diff] [blame] | 46 | |
Johan Hedberg | d0504ff | 2016-08-19 14:58:11 +0300 | [diff] [blame] | 47 | #ifdef __cplusplus |
| 48 | } |
| 49 | #endif |
Andrei Emeltchenko | 2b12ca8 | 2016-08-17 11:33:04 +0300 | [diff] [blame] | 50 | /** |
| 51 | * @} |
| 52 | */ |
Johan Hedberg | d0504ff | 2016-08-19 14:58:11 +0300 | [diff] [blame] | 53 | |
Flavio Ceolin | 67ca176 | 2018-09-14 10:43:44 -0700 | [diff] [blame] | 54 | #endif /* ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_ */ |