Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bt_hci_driver Struct Reference

Abstraction which represents the HCI transport to the controller. More...

#include <hci_driver.h>

Data Fields

const char * name
 Name of the driver.
 
enum bt_hci_driver_bus bus
 Bus of the transport (BT_HCI_DRIVER_BUS_*)
 
uint32_t quirks
 Specific controller quirks.
 
int(* open )(void)
 Open the HCI transport.
 
int(* close )(void)
 Close the HCI transport.
 
int(* send )(struct net_buf *buf)
 Send HCI buffer to controller.
 
int(* setup )(const struct bt_hci_setup_params *params)
 HCI vendor-specific setup.
 

Detailed Description

Abstraction which represents the HCI transport to the controller.

This struct is used to represent the HCI transport to the Bluetooth controller.

Field Documentation

◆ bus

enum bt_hci_driver_bus bt_hci_driver::bus

Bus of the transport (BT_HCI_DRIVER_BUS_*)

◆ close

int(* bt_hci_driver::close) (void)

Close the HCI transport.

Closes the HCI transport. This function must not return until the transport is closed.

Returns
0 on success or negative error number on failure.

◆ name

const char* bt_hci_driver::name

Name of the driver.

◆ open

int(* bt_hci_driver::open) (void)

Open the HCI transport.

Opens the HCI transport for operation. This function must not return until the transport is ready for operation, meaning it is safe to start calling the send() handler.

Returns
0 on success or negative error number on failure.

◆ quirks

uint32_t bt_hci_driver::quirks

Specific controller quirks.

These are set by the HCI driver and acted upon by the host. They can either be statically set at buildtime, or set at runtime before the HCI driver's open() callback returns.

◆ send

int(* bt_hci_driver::send) (struct net_buf *buf)

Send HCI buffer to controller.

Send an HCI command or ACL data to the controller. The exact type of the data can be checked with the help of bt_buf_get_type().

Note
This function must only be called from a cooperative thread.
Parameters
bufBuffer containing data to be sent to the controller.
Returns
0 on success or negative error number on failure.

◆ setup

int(* bt_hci_driver::setup) (const struct bt_hci_setup_params *params)

HCI vendor-specific setup.

Executes vendor-specific commands sequence to initialize BT Controller before BT Host executes Reset sequence.

Note
CONFIG_BT_HCI_SETUP must be selected for this field to be available.
Returns
0 on success or negative error number on failure.

The documentation for this struct was generated from the following file: