USB Controller
The USB_EP_MODE_ flags define what the type is for the given endpoint.
USB_EP_MODE_CTRL is a control endpoint.
USB_EP_MODE_ISOC is an isochronous endpoint.
USB_EP_MODE_BULK is a bulk endpoint.
USB_EP_MODE_INT is an interrupt endpoint.
The USB_EP_DMA_MODE_ flags determines the type of DMA access to the endpoint data FI-
FOs. The choice of the DMA mode depends on how the DMA controller is configured and how
it is being used. See the “Using USB with the uDMA Controller” section for more information
on DMA configuration.
When configuring an IN endpoint, the USB_EP_AUTO_SET bit can be specified to cause the
automatic transmission of data on the USB bus as soon as ui32MaxPacketSize bytes of data
are written into the FIFO for this endpoint. This is commonly used with DMA as no interaction
is required to start the transmission of data.
When configuring an OUT endpoint, the USB_EP_AUTO_REQUEST bit is specified to
trigger the request for more data once the FIFO has been drained enough to receive
ui32MaxPacketSize more bytes of data. Also for OUT endpoints, the USB_EP_AUTO_CLEAR
bit can be used to clear the data packet ready flag automatically once the data has been
read from the FIFO. If this is not used, this flag must be manually cleared via a call to
ROM_USBDevEndpointStatusClear(). Both of these settings can be used to remove the need
for extra calls when using the controller in DMA mode.
Note:
This function should only be called in device mode.
Returns:
None.
24.3.1.8 ROM_USBDevEndpointDataAck
Acknowledge that data was read from the given endpoint’s FIFO in device mode.
Prototype:
void
ROM_USBDevEndpointDataAck(uint32_t ui32Base,
uint32_t ui32Endpoint,
bool bIsLastPacket)
ROM Location:
ROM_APITABLE is an array of pointers located at 0x0100.0010.
ROM_USBTABLE is an array of pointers located at ROM_APITABLE[16].
ROM_USBDevEndpointDataAck is a function pointer located at ROM_USBTABLE[6].
Parameters:
ui32Base specifies the USB module base address.
ui32Endpoint is the endpoint to access.
bIsLastPacket indicates if this is the last packet.
Description:
This function acknowledges that the data was read from the endpoint’s FIFO. The bIsLast-
Packet parameter is set to a true value if this is the last in a series of data packets on endpoint
308 April 8, 2013