Trait synopsys_usb_otg::UsbPeripheral[][src]

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; fn phy_type(&self) -> PhyType { ... }
fn setup_internal_hs_phy(&self) { ... } }

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 ()[src]

Pointer to the register block

const HIGH_SPEED: bool[src]

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

const FIFO_DEPTH_WORDS: usize[src]

FIFO size in 32-bit words

const ENDPOINT_COUNT: usize[src]

Number of (bidirectional) endpoints

Loading content...

Required methods

fn enable()[src]

Enables USB device on its peripheral bus

fn ahb_frequency_hz(&self) -> u32[src]

AHB frequency in hertz

Loading content...

Provided methods

fn phy_type(&self) -> PhyType[src]

Returns PHY type that should be used for USB peripheral

fn setup_internal_hs_phy(&self)[src]

Performs initial setup of the internal high-speed PHY

This function should turn on LDO and PLL and wait for PHY clock to become stable.

Loading content...

Implementors

Loading content...