embassy-usb

Crates

git

Versions

default

Flavors

Skip to main content

Module device

Module device 

Source
Expand description

Bluetooth Host Controller Interface (HCI) over USB device implementation.

Conforms to Bluetooth Core Specification (v5.4, Vol 4, Part B: USB Transport Layer).

A Bluetooth USB dongle or controller exposes:

  • Control Endpoint (EP0): Receives HCI Commands from host via Class-Specific setup requests (bRequest = 0x00).
  • Interrupt IN Endpoint: Sends HCI Events from controller to host.
  • Bulk OUT Endpoint: Receives ACL Data packets from host.
  • Bulk IN Endpoint: Sends ACL Data packets from controller to host.

Structs§

AclReader
Receiver handle for ACL data packets sent by the host over the Bulk OUT endpoint.
AclWriter
Sender handle for ACL data packets sent to the host over the Bulk IN endpoint.
BluetoothHci
USB Bluetooth HCI class device.
Config
Configuration for the Bluetooth HCI device class.
HciCommandReader
Receiver handle for HCI commands sent by the host over the control endpoint.
HciEventWriter
Sender handle for HCI events sent to the host over the Interrupt IN endpoint.
State
State for the Bluetooth HCI device class.

Constants§

HCI_REQ_SEND_COMMAND
CCID/HCI command setup request code (bRequest = 0x00).
MAX_HCI_COMMAND_LEN
Maximum standard HCI command length (2 bytes opcode + 1 byte param length + up to 255 params).
USB_CLASS_WIRELESS_CONTROLLER
USB Class code for Wireless Controller.
USB_PROTOCOL_BLUETOOTH_PRIMARY
USB Protocol code for Bluetooth Primary Controller (HCI).
USB_SUBCLASS_RF_CONTROLLER
USB Subclass code for RF Controller.