USBDev_PipeWr

Description

Write data to device over the specified pipe.

Files

usbdev_api.c

Prototype

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


Arguments

pipe

Pipe handle.

p_buf

Pointer to transmit buffer.

buf_len

Transmit 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_TIMEOUT

Returned Value

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

0, otherwise.

Callers

Application.

Notes / Warnings

None.