AN050
GD32 USBFS&USBHS Firmware Library User Guide
20
Figure 5-1. Firmware library flowchart
USB clock configuration
USB timer configuration
User interface function register
start
Device class interface function register
Get serial string
USB basic / core initialization
usb_rcu_config
usb_timer_init
hid_itfop_register
udev->dev.class_core = class_core;
serial_string_get
usb_basic_init / usb_core_init
usbd_disconnect
USB device disconnect
USB FIFO
、
endpoint
、
interrupt enable
usb_devcore_init
USB device connect
usbd_connect
USB interrupt configuration
usb_intr_config
Enumeration process
Data transfer process
Interrupt handle
Corresponding function
5.3.
Descriptor
The descriptors of the USBFS device library are contained in the device class file, as shown
in the
Figure 5-2. Device class file path