Skip to main content

Module otg

Module otg 

Source
Expand description

USB On-The-Go

embassy-usb / embassy-usb-host integration: embassy_usb_device, embassy_usb_host.

§Example: Full-Speed USB

use esp_hal::usb::otg::{Usb, embassy_usb_device};

let usb = Usb::new_fs(
    peripherals.USB_FS,
    peripherals.GPIO27,
    peripherals.GPIO26,
);

§Example: High-Speed USB

use esp_hal::usb::otg::{Usb, embassy_usb_device};

let usb = Usb::new_hs(peripherals.USB_HS);

Modules§

embassy_usb_device
USB OTG device driver for embassy-usb (Synopsys DWC).
embassy_usb_host
USB OTG host driver for embassy-usb-host.

Structs§

Usb
Type-erased USB OTG handle.

Traits§

UsbFsDmunstable
USB D- pin for full-speed OTG.
UsbFsDpunstable
USB D+ pin for full-speed OTG.