AN050
GD32 USBFS&USBHS Firmware Library User Guide
16
Function name
Functional description
usb_devaddr_set
set the USB device address
usb_oepintnum_read
read device all OUT endpoint interrupt register
usb_oepintr_read
read device OUT endpoint interrupt flag register
usb_iepintnum_read
read device all IN endpoint interrupt register
usb_rwkup_set
set remote wakeup signalling
usb_rwkup_reset
reset remote wakeup signalling
Table 4-9
. drv_usbd_int.h/.c file function
Function name
Functional description
usbd_int_dedicated_ep1out
USB dedicated OUT endpoint 1 interrupt service routine handler
usbd_int_dedicated_ep1in
USB dedicated IN endpoint 1 interrupt service routine handler
usbd_isr
USB device-mode interrupts global service routine handler
usbd_intf_outep
indicates that an OUT endpoint has a pending interrupt
usbd_intf_inep
indicates that an in endpoint has a pending interrupt
usbd_int_rxfifo
handle the RX status queue level interrupt
usbd_int_reset
handle USB reset interrupt
usbd_int_enumfinish
handle USB speed enumeration finish interrupt
usbd_int_suspend
USB suspend interrupt handler
usbd_emptytxfifo_write
check FIFO for the next packet to be loaded
Table 4-10
. usbd_core.h/.c file function
Function name
Functional description
usbd_init
initailizes the USB device-mode stack and load the class driver
usbd_ep_setup
endpoint initialization
usbd_ep_clear
configure the endpoint when it is disabled
usbd_ep_recev
endpoint prepare to receive data
usbd_ep_send
endpoint prepare to transmit data
usbd_ep_stall
set an endpoint to STALL status
usbd_ep_stall_clear
clear endpoint STALLed status
usbd_fifo_flush
flush the endpoint FIFOs
usbd_connect
device connect
usbd_disconnect
device disconnect
usbd_addr_set
set USB device address
usbd_rxcount_get
get the received data length
Table 4-11
. usbd_enum.h/.c file function
Function name
Functional description
usbd_standard_request
handle USB standard device request
usbd_class_request
handle USB device class request
usbd_vendor_request
handle USB vendor request
usbd_enum_error
handle USB enumeration error
int_to_unicode
convert hex 32bits value into unicode char
serial_string_get
get serial string