usb_h_bulk_int_iso_xfer

Issue a bulk/interrupt/iso transfer on a pipe.

static int32_t usb_h_bulk_int_iso_xfer(
    struct usb_h_pipe * pipe,
    uint8_t * data,
    uint32_t length,
    bool auto_zlp
)

Parameters

pipe

Type: struct usb_h_pipe *

The pipe

data

Type: uint8_t *

Pointer to the data buffer

length

Type: uint32_t

The data length

auto_zlp

Type: bool

Auto append ZLP for OUT

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 control pipe

ERR_NONE

The operation is done successfully