[][src]Trait stm32_usbd::UsbPeripheral

pub unsafe trait UsbPeripheral: Send + Sync {
    const REGISTERS: *const ();
    const DP_PULL_UP_FEATURE: bool;
    const EP_MEMORY: *const ();
    const EP_MEMORY_SIZE: usize;

    fn enable();
fn startup_delay(); }

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 USBFS peripherals.

Associated Constants

const REGISTERS: *const ()

Pointer to the register block

const DP_PULL_UP_FEATURE: bool

Embedded pull-up resistor on USB_DP line

const EP_MEMORY: *const ()

Pointer to the endpoint memory

const EP_MEMORY_SIZE: usize

Endpoint memory size in bytes

Loading content...

Required methods

fn enable()

Enables USB device on its peripheral bus

fn startup_delay()

Performs a chip specific startup delay

This function is called in UsbBus::enable() after deasserting the pdwn bit and before peripheral initialization.

Loading content...

Implementors

Loading content...