Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
|
Bluetooth HCI APIs . More...
Data Structures | |
struct | bt_hci_setup_params |
struct | bt_hci_driver_api |
Macros | |
#define | BT_DT_HCI_QUIRK_OR(node_id, prop, idx) |
#define | BT_DT_HCI_QUIRKS_GET(node_id) |
#define | BT_DT_HCI_QUIRKS_INST_GET(inst) |
#define | BT_DT_HCI_NAME_GET(node_id) |
#define | BT_DT_HCI_NAME_INST_GET(inst) |
#define | BT_DT_HCI_BUS_GET(node_id) |
#define | BT_DT_HCI_BUS_INST_GET(inst) |
Typedefs | |
typedef int(* | bt_hci_recv_t) (const struct device *dev, struct net_buf *buf) |
Enumerations | |
enum | { BT_HCI_QUIRK_NO_RESET = BIT(0) , BT_HCI_QUIRK_NO_AUTO_DLE = BIT(1) } |
enum | bt_hci_bus { BT_HCI_BUS_VIRTUAL = 0 , BT_HCI_BUS_USB = 1 , BT_HCI_BUS_PCCARD = 2 , BT_HCI_BUS_UART = 3 , BT_HCI_BUS_RS232 = 4 , BT_HCI_BUS_PCI = 5 , BT_HCI_BUS_SDIO = 6 , BT_HCI_BUS_SPI = 7 , BT_HCI_BUS_I2C = 8 , BT_HCI_BUS_IPM = 9 } |
Possible values for the 'bus' member of the bt_hci_driver struct. More... | |
Functions | |
static int | bt_hci_open (const struct device *dev, bt_hci_recv_t recv) |
Open the HCI transport. | |
static int | bt_hci_close (const struct device *dev) |
Close the HCI transport. | |
static int | bt_hci_send (const struct device *dev, struct net_buf *buf) |
Send HCI buffer to controller. | |
static int | bt_hci_setup (const struct device *dev, struct bt_hci_setup_params *params) |
HCI vendor-specific setup. | |
Bluetooth HCI APIs .
#define BT_DT_HCI_BUS_GET | ( | node_id | ) |
#include <zephyr/drivers/bluetooth.h>
#define BT_DT_HCI_BUS_INST_GET | ( | inst | ) |
#include <zephyr/drivers/bluetooth.h>
#define BT_DT_HCI_NAME_GET | ( | node_id | ) |
#include <zephyr/drivers/bluetooth.h>
#define BT_DT_HCI_NAME_INST_GET | ( | inst | ) |
#include <zephyr/drivers/bluetooth.h>
#define BT_DT_HCI_QUIRK_OR | ( | node_id, | |
prop, | |||
idx ) |
#include <zephyr/drivers/bluetooth.h>
#define BT_DT_HCI_QUIRKS_GET | ( | node_id | ) |
#include <zephyr/drivers/bluetooth.h>
#define BT_DT_HCI_QUIRKS_INST_GET | ( | inst | ) |
#include <zephyr/drivers/bluetooth.h>
#include <zephyr/drivers/bluetooth.h>
anonymous enum |
#include <zephyr/drivers/bluetooth.h>
Enumerator | |
---|---|
BT_HCI_QUIRK_NO_RESET | |
BT_HCI_QUIRK_NO_AUTO_DLE |
enum bt_hci_bus |
#include <zephyr/drivers/bluetooth.h>
Possible values for the 'bus' member of the bt_hci_driver struct.
Enumerator | |
---|---|
BT_HCI_BUS_VIRTUAL | |
BT_HCI_BUS_USB | |
BT_HCI_BUS_PCCARD | |
BT_HCI_BUS_UART | |
BT_HCI_BUS_RS232 | |
BT_HCI_BUS_PCI | |
BT_HCI_BUS_SDIO | |
BT_HCI_BUS_SPI | |
BT_HCI_BUS_I2C | |
BT_HCI_BUS_IPM |
|
inlinestatic |
#include <zephyr/drivers/bluetooth.h>
Close the HCI transport.
Closes the HCI transport. This function must not return until the transport is closed.
dev | HCI device |
|
inlinestatic |
#include <zephyr/drivers/bluetooth.h>
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.
dev | HCI device |
recv | This is callback through which the HCI driver provides the host with data from the controller. The buffer passed to the callback will have its type set with bt_buf_set_type(). The callback is expected to be called from thread context. |
#include <zephyr/drivers/bluetooth.h>
Send HCI buffer to controller.
Send an HCI packet to the controller. The packet type of the buffer must be set using bt_buf_set_type().
dev | HCI device |
buf | Buffer containing data to be sent to the controller. |
|
inlinestatic |
#include <zephyr/drivers/bluetooth.h>
HCI vendor-specific setup.
Executes vendor-specific commands sequence to initialize BT Controller before BT Host executes Reset sequence. This is normally called directly after bt_hci_open().
CONFIG_BT_HCI_SETUP
must be selected for this field to be available.