![FTDI FT51A Скачать руководство пользователя страница 140](http://html1.mh-extra.com/html/ftdi/ft51a/ft51a_application-note_2341158140.webp)
Application Note
AN_289 FT51A Programming Guide
Version 1.0
Document Reference No.: FT_000962 Clearance No.: FTDI# 483
139
Copyright © 2015 Future Technology Devices International Limited
The function will initialise memory structures for control IN and OUT endpoints and register an
interrupt handler for peripheral interrupts from the USB device. The hub will be configured as
requested and the USB Full Speed device controller device will be enabled ready to be discovered
by the host.
This should only be called once in the application.
3.1.2.2
USB_req_set_address
File: ft51_usb_address.c
Requires: ft51_usb_transfer.c, ft51_usb_endpoint_features.c
Sets the USB address of the device during enumeration. This is called from the call-back function
which deals with standard requests when a SET_ADDRESS request is received.
3.1.2.3
USB_req_set_configuration
File: ft51_usb_configuration.c
Requires: ft51_usb_transfer.c
The last step of enumeration is the SET_CONFIGURATION request. This is a standard request and
this function is called from the standard request call-back function.
3.1.2.4
USB_req_get_configuration
File: ft51_usb_configuration.c
This function will return the current configuration for the GET_CONFIGURATION request to the
host. This is a standard request and this function is called from the standard request call-back
function.
3.1.2.5
USB_clear_endpoint
File: ft51_usb_endpoint_features.c
This is called by the standard CLEAR_FEATURE request when an endpoint stall clear is required.
When this request is received by the application then it should call this handler to clear the
selected endpoint. The application standard request handler must then return a zero length
acknowledge packet to the host.
This may also be called by an application to manage an endpoint.
3.1.2.6
USB_stall_endpoint
File: ft51_usb_endpoint_features.c
This can be called by the standard SET_FEATURE request when an endpoint stall is required. When
this request is received by the application then it should call this handler to stall the selected
endpoint. The application standard request handler must then return a zero length acknowledge
packet to the host.
This may also be called by an application to manage an endpoint when a stall is required. For
instance when request for an unimplemented SETUP transaction is received.
3.1.2.7
USB_free_endpoint
File: ft51_usb_endpoint.c
This function can be used to disable an endpoint.
3.1.2.8
USB_create_endpoint
File: ft51_usb_endpoint.c
This function can be used to enable an endpoint. It will return a status indicating if the endpoint
was created.