Zephyr Project API 4.0.0
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) UTIL_CAT(BT_HCI_QUIRK_, DT_STRING_UPPER_TOKEN_BY_IDX(node_id, prop, idx)) |
#define | BT_DT_HCI_QUIRKS_GET(node_id) |
#define | BT_DT_HCI_QUIRKS_INST_GET(inst) BT_DT_HCI_QUIRKS_GET(DT_DRV_INST(inst)) |
#define | BT_DT_HCI_NAME_GET(node_id) DT_PROP_OR(node_id, bt_hci_name, "HCI") |
#define | BT_DT_HCI_NAME_INST_GET(inst) BT_DT_HCI_NAME_GET(DT_DRV_INST(inst)) |
#define | BT_DT_HCI_BUS_GET(node_id) UTIL_CAT(BT_HCI_BUS_, DT_STRING_UPPER_TOKEN_OR(node_id, bt_hci_bus, VIRTUAL)) |
#define | BT_DT_HCI_BUS_INST_GET(inst) BT_DT_HCI_BUS_GET(DT_DRV_INST(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_SMD = 9 , BT_HCI_BUS_VIRTIO = 10 , BT_HCI_BUS_IPC = 11 , BT_HCI_BUS_IPM = BT_HCI_BUS_IPC } |
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 | ) | UTIL_CAT(BT_HCI_BUS_, DT_STRING_UPPER_TOKEN_OR(node_id, bt_hci_bus, VIRTUAL)) |
#include <include/zephyr/drivers/bluetooth.h>
#define BT_DT_HCI_BUS_INST_GET | ( | inst | ) | BT_DT_HCI_BUS_GET(DT_DRV_INST(inst)) |
#include <include/zephyr/drivers/bluetooth.h>
#define BT_DT_HCI_NAME_GET | ( | node_id | ) | DT_PROP_OR(node_id, bt_hci_name, "HCI") |
#include <include/zephyr/drivers/bluetooth.h>
#define BT_DT_HCI_NAME_INST_GET | ( | inst | ) | BT_DT_HCI_NAME_GET(DT_DRV_INST(inst)) |
#include <include/zephyr/drivers/bluetooth.h>
#define BT_DT_HCI_QUIRK_OR | ( | node_id, | |
prop, | |||
idx | |||
) | UTIL_CAT(BT_HCI_QUIRK_, DT_STRING_UPPER_TOKEN_BY_IDX(node_id, prop, idx)) |
#include <include/zephyr/drivers/bluetooth.h>
#define BT_DT_HCI_QUIRKS_GET | ( | node_id | ) |
#include <include/zephyr/drivers/bluetooth.h>
#define BT_DT_HCI_QUIRKS_INST_GET | ( | inst | ) | BT_DT_HCI_QUIRKS_GET(DT_DRV_INST(inst)) |
#include <include/zephyr/drivers/bluetooth.h>
#include <include/zephyr/drivers/bluetooth.h>
anonymous enum |
#include <include/zephyr/drivers/bluetooth.h>
Enumerator | |
---|---|
BT_HCI_QUIRK_NO_RESET | |
BT_HCI_QUIRK_NO_AUTO_DLE |
enum bt_hci_bus |
#include <include/zephyr/drivers/bluetooth.h>
Possible values for the 'bus' member of the bt_hci_driver struct.
|
inlinestatic |
#include <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 <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 <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 <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_SETUPmust be selected for this field to be available.