sub_fifo_write

Top  Previous  Next
Got to SUB-20 page

Synopsis

int sub_fifo_write( sub_handle hndl, char* buf, int sz, int to_ms )

 

Function attempts to transfer sz bytes from buffer into OUT FIFO in no more then to_ms time.

Parameters

buf - source buffer

sz - buffer size

to_ms - timeout in milliseconds

 

Return Value

On success a non negative number of actually written bytes is returned. It can be less then or equal to sz. In case of error negative error code (defined in errno.h) will be returned and if applicable sub_errno will be set to the corresponding value. Possible error codes are

-ENOENT (-2)

USB failure

-EIO (-5)

USB failure

-ENOMEM (-12)

Memory failure

-EINVAL (-22)

Invalid parameter

-EFBIG (-27)

Buffer overflow

-ETIMEDOUT (-116)

Timeout