![FTDI FT51A Application Note Download Page 141](http://html1.mh-extra.com/html/ftdi/ft51a/ft51a_application-note_2341158141.webp)
Application Note
AN_289 FT51A Programming Guide
Version 1.0
Document Reference No.: FT_000962 Clearance No.: FTDI# 483
140
Copyright © 2015 Future Technology Devices International Limited
The USB_initialise function will call this function for the control endpoints. It is not necessary to
call this function from elsewhere to create control endpoints.
3.1.2.9
USB_ep_buffer_full
File: ft51_usb_ep_buffer_full.c
OUT endpoints can be polled to see if there is data requiring action. This function is used to check
an OUT endpoint for data received from the host. A non-zero value indicates that there is data
received.
For IN endpoints, the return value indicates that data is waiting to be transmitted to the host at
the next IN request.
3.1.2.10
USB_get_ep_stalled
File: ft51_usb_endpoint_features.c
This will return a non-zero value if the endpoint is stalled.
3.1.2.11
USB_get_state
File: ft51_usb_state.c
This function will return the current state of the USB device. This is defined in Section 9.1 of the
USB Specifications.
3.1.2.12
USB_set_state
File: ft51_usb_state.c
Calling this function will set the current state of the USB device. This is defined in Section 9.1 of
the USB Specifications.
3.1.2.13
USB_transfer
File: ft51_usb_transfer.c
Performs a data transfer from the USB device to or from the USB host. This will use an endpoint
handle to select the endpoint used for the transfer. A zero length packet for a control endpoint
acknowledge can be sent via this function.
3.1.2.14
USB_process
File: ft51_usb_process.c
Requires: ft51_usb_endpoint_features.c, ft51_usb_remote_wakeup_feature.c
When the application is running it should call this function to process events received by the USB
device. Processing will result in the activation of call-back functions if required.
3.1.2.15
USB_isr
File: ft51_usb_isr.c
This is the routine that handles interrupts from the USB Full Speed device controller device on the
FT51A. It will check and clear interrupt status bits and call handler routines accordingly.
When USB_initialise is called, it will register this function as the handler for USB interrupts.
3.1.2.16
USB_finalise
File: ft51_usb_finalise.c
Will release all resources held by the USB device and disable all endpoints.