[][src]Trait synopsys_usb_otg::UsbPeripheral

pub unsafe trait UsbPeripheral: Send + Sync {
    const REGISTERS: *const ();
    const HIGH_SPEED: bool;
    const FIFO_DEPTH_WORDS: usize;
    const ENDPOINT_COUNT: usize;

    fn enable();
fn ahb_frequency_hz(&self) -> u32; }

A trait for device-specific USB peripherals. Implement this to add support for a new hardware platform. Peripherals that have this trait must have the same register block as STM32 USB OTG peripherals.

Associated Constants

const REGISTERS: *const ()

Pointer to the register block

const HIGH_SPEED: bool

true for High Speed variants of the peripheral, false for Full Speed

const FIFO_DEPTH_WORDS: usize

FIFO size in 32-bit words

const ENDPOINT_COUNT: usize

Number of (bidirectional) endpoints

Loading content...

Required methods

fn enable()

Enables USB device on its peripheral bus

fn ahb_frequency_hz(&self) -> u32

AHB frequency in hertz

Loading content...

Implementors

Loading content...