4.4.6.3.18 USB_SetupProcessDeviceRequest()

RETURN_CODE_t USB_SetupProcessDeviceRequest (USB_SETUP_REQUEST_t * setupRequestPtr)

Setup function for the device requests.

USB 2.0 Specification Ch 9.4.

bRequest

wValue

wIndex

wLength

Data

CLEAR_FEATURE

Feature selector

Zero

Zero

None

GET_CONFIGURATION

Zero

Zero

One

Config value

GET_DESCRIPTOR

Type and index

Zero or ID

Length

Descriptor

GET_STATUS

Zero

Endpoint

Two

Device status

SET_ADDRESS

Device address

Zero

Zero

None

SET_CONFIGURATION

Config value

Zero

Zero

None

SET_DESCRIPTOR

Type and index

Zero or ID

Length

Descriptor

SET_FEATURE

Feature selector

Zero

Zero

None

Parameters:
setupRequestPtr

- Pointer to the setup request and its data

Returns:

SUCCESS or an Error code according to RETURN_CODE_t