blob: dba2d4af5fe4b0a9292b0d02ec0b312cca7b40c3 [file] [log] [blame]
Andrei Emeltchenko2b12ca82016-08-17 11:33:04 +03001/** @file
2 * @brief Bluetooth HCI RAW channel handling
3 */
Andrei Emeltchenko6ab1b9c2016-08-09 11:13:52 +03004
5/*
6 * Copyright (c) 2016 Intel Corporation
7 *
David B. Kinderac74d8b2017-01-18 17:01:01 -08008 * SPDX-License-Identifier: Apache-2.0
Andrei Emeltchenko6ab1b9c2016-08-09 11:13:52 +03009 */
Flavio Ceolin67ca1762018-09-14 10:43:44 -070010#ifndef ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_
11#define ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_
Andrei Emeltchenko6ab1b9c2016-08-09 11:13:52 +030012
Andrei Emeltchenko2b12ca82016-08-17 11:33:04 +030013/**
14 * @brief HCI RAW channel
15 * @defgroup hci_raw HCI RAW channel
16 * @ingroup bluetooth
17 * @{
18 */
19
Johan Hedbergd0504ff2016-08-19 14:58:11 +030020#ifdef __cplusplus
21extern "C" {
22#endif
23
Andrei Emeltchenko2b12ca82016-08-17 11:33:04 +030024/** @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 Emeltchenko6ab1b9c2016-08-09 11:13:52 +030033int bt_send(struct net_buf *buf);
Andrei Emeltchenko2b12ca82016-08-17 11:33:04 +030034
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 Janc47eaaf92016-11-10 10:45:10 +010045int bt_enable_raw(struct k_fifo *rx_queue);
Andrei Emeltchenko2b12ca82016-08-17 11:33:04 +030046
Johan Hedbergd0504ff2016-08-19 14:58:11 +030047#ifdef __cplusplus
48}
49#endif
Andrei Emeltchenko2b12ca82016-08-17 11:33:04 +030050/**
51 * @}
52 */
Johan Hedbergd0504ff2016-08-19 14:58:11 +030053
Flavio Ceolin67ca1762018-09-14 10:43:44 -070054#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_ */