/// Convenience function for setting up USB
Convenience function for setting up USB
Convenience function for setting up USB
pub fn usb_allocator(
    usb: pac::USB,
    clocks: &mut GenericClockController,
    mclk: &mut pac::MCLK,
    dm: impl Into<UsbDm>,
    dp: impl Into<UsbDp>,
) -> UsbBusAllocator<UsbBus> {
    let gclk0 = clocks.gclk0();
    let clock = &clocks.usb(&gclk0).unwrap();
    let (dm, dp) = (dm.into(), dp.into());
    UsbBusAllocator::new(UsbBus::new(clock, mclk, dm, dp, usb))
}
pub fn usb_allocator ( usb : pac :: USB , clocks : & mut GenericClockController , mclk : & mut pac :: MCLK , dm : impl Into < UsbDm > , dp : impl Into < UsbDp > , ) -> UsbBusAllocator < UsbBus > { let gclk0 = clocks . gclk0 ( ) ; let clock = & clocks . usb ( & gclk0 ) . unwrap ( ) ; let ( dm , dp ) = ( dm . into ( ) , dp . into ( ) ) ; UsbBusAllocator :: new ( UsbBus :: new ( clock , mclk , dm , dp , usb ) ) }
Convenience function for setting up USB
Convenience function for setting up USB
usb
pac::USB
clocks
&mut GenericClockController
mclk
&mut pac::MCLK
dm
impl Into<UsbDm>
dp
impl Into<UsbDp>