39.2.1.18 usb_h_control_xfer
Issue a control transfer (request) on a pipe.
static int32_t usb_h_control_xfer(
struct usb_h_pipe * pipe,
uint8_t * setup,
uint8_t * data,
uint16_t length,
int16_t timeout
)
Parameters
- pipe
-
Type: struct usb_h_pipe *
The pipe
- setup
-
Type: uint8_t *
Pointer to the setup packet
- data
-
Type: uint8_t *
Pointer to the data buffer
- length
-
Type: uint16_t
The data length
- timeout
-
Type: int16_t
Timeout for whole request in ms
Returns
Type: int32_t
Operation result status
- ERR_NOT_INITIALIZED
-
Pipe is not allocated
- ERR_BUSY
-
Pipe is busy transferring
- ERR_INVALID_ARG
-
Argument error
- ERR_UNSUPPORTED_OP
-
Pipe is not control pipe
- ERR_NONE
-
Operation done successfully