USBDev_PipeRd

USBDev_PipeRd

Description

Read data from device over the specified pipe.

Files

usbdev_api.c

Prototype

DWORD USBDev_PipeRd (HANDLE pipe, UCHAR *p_buf, DWORD buf_len, DWORD timeout, DWORD *p_err);



Arguments

pipe

Pipe handle.

p_buf

Pointer to receive buffer.

buf_len

Receive buffer length.

timeout

Timeout in milliseconds. A value of 0 indicates a wait forever.

p_err

Pointer to variable that will receive the return error code from this function:

ERROR_SUCCESS

ERROR_INVALID_HANDLE

ERROR_INVALID_USER_BUFFER

ERROR_BAD_PIPE

ERROR_INVALID_PARAMETER

ERROR_NOT_ENOUGH_MEMORY

ERROR_SEM_TIMEOUT7

Returned Value

Number of bytes received, if NO error(s).

0, otherwise.

Callers

Application.

Notes / Warnings

None.