uint8_t USBHostIssueDeviceRequest( uint8_t deviceAddress, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint16_t wLength, uint8_t * data, uint8_t dataDirection, uint8_t clientDriverID );
This function sends a standard device request to the attached device. The user must pass in the parameters of the device request. If there is input or output data associated with the request, a pointer to the data must be provided. The direction of the associated data (input or output) must also be indicated.
This function does no special processing in regards to the request except for three requests. If SET INTERFACE is sent, then DTS is reset for all endpoints. If CLEAR FEATURE (ENDPOINT HALT) is sent, then DTS is reset for that endpoint. If SET CONFIGURATION is sent, the request is aborted with a failure. The function USBHostSetDeviceConfiguration() must be called to change the device configuration, since endpoint definitions may change.
The host state machine should be in the running state, and no reads or writes to EP0 should be in progress.
Return Values |
Description |
USB_SUCCESS |
Request processing started |
USB_UNKNOWN_DEVICE |
Device not found |
USB_INVALID_STATE |
The host must be in a normal running state to do this request |
USB_ENDPOINT_BUSY |
A read or write is already in progress |
USB_ILLEGAL_REQUEST |
SET CONFIGURATION cannot be performed with this function. |
DTS reset is done before the command is issued.
MLA - USB Library Help Version : 2.16
![]() |