Function libopencm3_sys::usbd_init[][src]

pub unsafe extern "C" fn usbd_init(
    driver: *const usbd_driver,
    dev: *const usb_device_descriptor,
    conf: *const usb_config_descriptor,
    strings: *mut *const c_char,
    num_strings: c_int,
    control_buffer: *mut u8,
    control_buffer_size: u16
) -> *mut usbd_device

Main initialization entry point.

Initialize the USB firmware library to implement the USB device described by the descriptors provided.

It is required that the 48MHz USB clock is already available.

@param driver TODO @param dev Pointer to USB device descriptor. This must not be changed while the device is in use. @param conf Pointer to array of USB configuration descriptors. These must not be changed while the device is in use. The length of this array is determined by the bNumConfigurations field in the device descriptor. @param strings TODO @param control_buffer Pointer to array that would hold the data received during control requests with DATA stage @param control_buffer_size Size of control_buffer @return the usb device initialized for use. (currently cannot fail).