2016-08-17 11:33:04 +03:00
|
|
|
/** @file
|
|
|
|
* @brief Bluetooth HCI RAW channel handling
|
|
|
|
*/
|
2016-08-09 11:13:52 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Intel Corporation
|
|
|
|
*
|
2017-01-18 17:01:01 -08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-08-09 11:13:52 +03:00
|
|
|
*/
|
2018-09-14 10:43:44 -07:00
|
|
|
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_
|
|
|
|
#define ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_
|
2016-08-09 11:13:52 +03:00
|
|
|
|
2016-08-17 11:33:04 +03:00
|
|
|
/**
|
|
|
|
* @brief HCI RAW channel
|
|
|
|
* @defgroup hci_raw HCI RAW channel
|
|
|
|
* @ingroup bluetooth
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2016-08-19 14:58:11 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-08-17 11:33:04 +03:00
|
|
|
/** @brief Send packet to the Bluetooth controller
|
|
|
|
*
|
|
|
|
* Send packet to the Bluetooth controller. Caller needs to
|
|
|
|
* implement netbuf pool.
|
|
|
|
*
|
|
|
|
* @param buf netbuf packet to be send
|
|
|
|
*
|
|
|
|
* @return Zero on success or (negative) error code otherwise.
|
|
|
|
*/
|
2016-08-09 11:13:52 +03:00
|
|
|
int bt_send(struct net_buf *buf);
|
2016-08-17 11:33:04 +03:00
|
|
|
|
|
|
|
/** @brief Enable Bluetooth RAW channel
|
|
|
|
*
|
|
|
|
* Enable Bluetooth RAW HCI channel.
|
|
|
|
*
|
|
|
|
* @param rx_queue netbuf queue where HCI packets received from the Bluetooth
|
|
|
|
* controller are to be queued. The queue is defined in the caller while
|
|
|
|
* the available buffers pools are handled in the stack.
|
|
|
|
*
|
|
|
|
* @return Zero on success or (negative) error code otherwise.
|
|
|
|
*/
|
2016-11-10 10:45:10 +01:00
|
|
|
int bt_enable_raw(struct k_fifo *rx_queue);
|
2016-08-17 11:33:04 +03:00
|
|
|
|
2016-08-19 14:58:11 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2016-08-17 11:33:04 +03:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
2016-08-19 14:58:11 +03:00
|
|
|
|
2018-09-14 10:43:44 -07:00
|
|
|
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_ */
|