39.2.1.16 usb_h_pipe_set_control_param
Modify parameters of an allocated control pipe.
static int32_t usb_h_pipe_set_control_param(
struct usb_h_pipe * pipe,
uint8_t dev,
uint8_t ep,
uint16_t max_pkt_size,
uint8_t speed
)
Parameters
- pipe
-
Type: struct usb_h_pipe *
The pipe
- dev
-
Type: uint8_t
The device address
- ep
-
Type: uint8_t
The endpoint address
- max_pkt_size
-
Type: uint16_t
The maximum packet size, must be equal or less than the allocated size
- speed
-
Type: uint8_t
The working speed
Returns
Type: int32_t
Operation result status
- ERR_NOT_INITIALIZED
-
The pipe is not allocated
- ERR_BUSY
-
The pipe is busy transferring
- ERR_INVALID_ARG
-
Argument error
- ERR_UNSUPPORTED_OP
-
The pipe is not control pipe
- ERR_NONE
-
The operation is done successfully