USB Device Controller library functions. More...
#include <slist.h>#include <string.h>#include <types.h>#include <usb/request.h>Go to the source code of this file.
Data Structures | |
| struct | udc_fifo |
| Internal state variables used by the FIFO accessors. More... | |
Functions | |
UDC Library Interface | |
| status_t | udc_enter_test_mode (struct udc *udc, unsigned int mode) |
| Enter Test Mode. | |
| status_t | udc_lib_process_setup_request (struct udc *udc, struct usb_setup_req *req) |
| Handle a USB SETUP request. | |
FIFO Access Helpers | |
The following functions may be used by the UDC driver to copy data into and out of a FIFO aperture. It is assumed that the FIFO aperture has a fixed size equal to the max packet size of the endpoint, and that the bytes within it must be accessed sequentially from offset 0 up to the number of bytes available, i.e. no random access is possible. | |
| static void | udc_fifo_init (struct udc_fifo *fifo, size_t aperture_size) |
| Initialize the internal state of the FIFO. | |
| static bool | udc_fifo_zlp_is_pending (struct udc_fifo *fifo, struct usb_request *req) |
| Return true if the UDC driver is to send a Zero-Length Packet once the controller is ready to send a new packet. | |
| static void | udc_fifo_zlp_clear_pending (struct udc_fifo *fifo, struct usb_request *req) |
| Notify the FIFO accessors that a ZLP has been queued, so it is not pending anymore. | |
| static int | udc_fifo_write_data (void *dest, struct udc_fifo *fifo, struct slist *done_list, struct usb_request *req) |
| Copy data from one or more buffers into the FIFO. | |
| static unsigned int | udc_fifo_read_data (const void *src, struct udc_fifo *fifo, unsigned int fifo_nbytes, struct slist *done_bufs, struct usb_request *req) |
| Copy data from the FIFO into one or more buffers. | |
USB Device Controller library functions.
Copyright (C) 2009 Atmel Corporation. All rights reserved.
Definition in file udc_lib.h.
1.6.3