2016-08-17 16:33:04 +08:00
|
|
|
/** @file
|
|
|
|
* @brief Bluetooth HCI RAW channel handling
|
|
|
|
*/
|
2016-08-09 16:13:52 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Intel Corporation
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2016-08-19 19:58:11 +08:00
|
|
|
#ifndef __BT_HCI_RAW_H
|
|
|
|
#define __BT_HCI_RAW_H
|
2016-08-09 16:13:52 +08:00
|
|
|
|
2016-08-17 16:33:04 +08:00
|
|
|
/**
|
|
|
|
* @brief HCI RAW channel
|
|
|
|
* @defgroup hci_raw HCI RAW channel
|
|
|
|
* @ingroup bluetooth
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2016-08-19 19:58:11 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-08-17 16:33:04 +08: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 16:13:52 +08:00
|
|
|
int bt_send(struct net_buf *buf);
|
2016-08-17 16:33:04 +08: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 17:45:10 +08:00
|
|
|
int bt_enable_raw(struct k_fifo *rx_queue);
|
2016-08-17 16:33:04 +08:00
|
|
|
|
2016-08-19 19:58:11 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2016-08-17 16:33:04 +08:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
2016-08-19 19:58:11 +08:00
|
|
|
|
|
|
|
#endif /* __BT_HCI_RAW_H */
|