#include <byteorder.h>
#include <debug.h>
#include <usb/function.h>
#include <usb/udc.h>
#include <usb/usb_protocol.h>

Go to the source code of this file.
Functions | |
| int | udc_lib_process_setup_request (struct udc *udc, struct usb_setup_req *req) |
| Handle a USB SETUP request. | |
This file contains various utility functions for use by UDC drivers.
Definition in file udc_lib.c.
| int udc_lib_process_setup_request | ( | struct udc * | udc, | |
| struct usb_setup_req * | req | |||
| ) |
Handle a USB SETUP request.
This function parses a USB SETUP request and submits an appropriate response back to the host or, in the case of SETUP OUT requests with data, sets up a buffer for receiving the data payload.
Standard requests defined by the USB 2.0 standard are handled internaly, while class- and vendor-specific requests are passed on to the function driver.
| udc | USB Device Controller instance. | |
| req | The raw USB SETUP request. |
Definition at line 224 of file udc_lib.c.
References usb_setup_req::bmRequestType, usb_setup_req::bRequest, dbg_printf, usb_func_process_setup_request(), usb_setup_req::wIndex, usb_setup_req::wLength, and usb_setup_req::wValue.

1.5.8