AN050
GD32 USBFS&USBHS Firmware Library User Guide
15
Function name
Functional description
usbh_pipe_update
modify a pipe
usbh_pipe_allocate
allocate a new pipe
usbh_pipe_free
free a pipe
usbh_pipe_delete
delete all USB host pipe
usbh_freepipe_get
get a free pipe number for allocation
Table 4-7
. usbh_transc.h/.c file function
Function name
Functional description
usbh_ctlsetup_send
send the setup packet to the USB device
usbh_data_send
send a data packet to the USB device
usbh_data_recev
receive a data packet from the USB device
usbh_ctl_handler
USB control transfer handler
usbh_urb_wait
wait for USB URB(USB request block) state
usbh_setup_transc
USB setup transaction
usbh_data_in_transc
USB data IN transaction
usbh_data_out_transc
USB data OUT transaction
usbh_status_in_transc
USB status IN transaction
usbh_status_out_transc
USB status OUT transaction
usbh_request_submit
prepare a pipe and start a transfer
4.2.
Device middle layer driver function
Table 4-8
. drv_usb_dev.h/.c file function
Function name
Functional description
usb_devcore_init
initialize USB core registers for device mode
usb_devint_enable
enable the USB device mode interrupts
usb_transc0_active
active the USB endpoint 0 transaction
usb_transc_active
active the USB transaction
usb_transc_deactivate
deactive the USB transaction
usb_transc_inxfer
configure USB transaction to start IN transfer
usb_transc_outxfer
configure USB transaction to start OUT transfer
usb_transc_stall
set the USB transaction STALL status
usb_transc_clrstall
clear the USB transaction STALL status
usb_iepintr_read
read device IN endpoint interrupt flag register
usb_ctlep_startout
configures OUT endpoint 0 to receive SETUP packets
usb_rwkup_active
active remote wakeup signalling
usb_clock_active
active USB core clock
usb_dev_suspend
USB device suspend
usb_dev_stop
stop the device and clean up fifos
usb_dev_disconnect
config the USB device to be disconnected
usb_dev_connect
config the USB device to be connected