Perform asynchronous write operation on the analog input subdevice.
The function a4l_async_write() is only useful for acquisition configured through an Analogy command.
- Parameters
-
[in] | dsc | Device descriptor filled by a4l_open() (and optionally a4l_fill_desc()) |
[in] | buf | Ouput buffer |
[in] | nbyte | Number of bytes to write |
[in] | ms_timeout | The number of miliseconds to wait for some free area to be available. Passing A4L_INFINITE causes the caller to block indefinitely until some data is available. Passing A4L_NONBLOCK causes the function to return immediately without waiting any available space to write data. |
- Returns
- Number of bytes written, otherwise negative error code:
- -EINVAL is returned if some argument is missing or wrong, the descriptor should be checked; check also the kernel log
- -ENOENT is returned if the device's reading subdevice is idle (no command was sent)
- -EFAULT is returned if a user <-> kernel transfer went wrong
- -EINTR is returned if calling task has been unblocked by a signal