pub fn init(
        self,
        usb: super::pac::USB,
        clocks: &mut GenericClockController,
        mclk: &mut MCLK,
    ) -> UsbBusAllocator<UsbBus> {
        clocks.configure_gclk_divider_and_source(GEN_A::GCLK2, 1, SRC_A::DFLL, false);
        let usb_gclk = clocks.get_gclk(GEN_A::GCLK2).unwrap();
        let usb_clock = &clocks.usb(&usb_gclk).unwrap();

        UsbBusAllocator::new(UsbBus::new(usb_clock, mclk, self.dm, self.dp, usb))
    }
/// Convenience for setting up the onboard usb port to operate
/// as a USB device.
Convenience for setting up the onboard usb port to operate
as a USB device.
Convenience for setting up the onboard usb port to operate as a USB device .
pub fn init(
        self,
        usb: super::pac::USB,
        clocks: &mut GenericClockController,
        mclk: &mut MCLK,
    ) -> UsbBusAllocator<UsbBus> {
        clocks.configure_gclk_divider_and_source(GEN_A::GCLK2, 1, SRC_A::DFLL, false);
        let usb_gclk = clocks.get_gclk(GEN_A::GCLK2).unwrap();
        let usb_clock = &clocks.usb(&usb_gclk).unwrap();
        UsbBusAllocator::new(UsbBus::new(usb_clock, mclk, self.dm, self.dp, usb))
    }
pub fn init ( self , usb : super :: pac :: USB , clocks : & mut GenericClockController , mclk : & mut MCLK , ) -> UsbBusAllocator < UsbBus > { clocks . configure_gclk_divider_and_source ( GEN_A :: GCLK2 , 1 , SRC_A :: DFLL , false ) ; let usb_gclk = clocks . get_gclk ( GEN_A :: GCLK2 ) . unwrap ( ) ; let usb_clock = & clocks . usb ( & usb_gclk ) . unwrap ( ) ; UsbBusAllocator :: new ( UsbBus :: new ( usb_clock , mclk , self . dm , self . dp , usb ) ) }
Convenience for setting up the onboard usb port to operate
as a USB device.
Convenience for setting up the onboard usb port to operate as a USB device .
self
usb
super::pac::USB
clocks
&mut GenericClockController
mclk
&mut MCLK
self
usb
super::pac::USB
clocks
&mut GenericClockController
mclk
&mut MCLK