Bluetooth: hci_raw: Add support for using H:4 transport

This adds 2 config options which enables hci_raw to work in
H:4 mode and enable it by default automatically.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2020-03-18 17:09:20 -07:00 committed by Johan Hedberg
commit b3ee8be80d
6 changed files with 167 additions and 122 deletions

View file

@ -32,6 +32,41 @@ extern "C" {
*/
int bt_send(struct net_buf *buf);
enum {
/** Passthrough mode
*
* While in this mode the buffers are passed as is between the stack
* and the driver.
*/
BT_HCI_RAW_MODE_PASSTHROUGH = 0x00,
/** H:4 mode
*
* While in this mode H:4 headers will added into the buffers
* according to the buffer type when coming from the stack and will be
* removed and used to set the buffer type.
*/
BT_HCI_RAW_MODE_H4 = 0x01,
};
/** @brief Set Bluetooth RAW channel mode
*
* Set access mode of Bluetooth RAW channel.
*
* @param mode Access mode.
*
* @return Zero on success or (negative) error code otherwise.
*/
int bt_hci_raw_set_mode(u8_t mode);
/** @brief Get Bluetooth RAW channel mode
*
* Get access mode of Bluetooth RAW channel.
*
* @return Access mode.
*/
u8_t bt_hci_raw_get_mode(void);
/** @brief Enable Bluetooth RAW channel
*
* Enable Bluetooth RAW HCI channel.