comedi_command
Prev | 5.4.2. Asynchronous commands | Next

## Name

comedi_command — start streaming input/output

## Synopsis

    #include <comedilib.h>

`int comedi_command(` | comedi_t * device,
| comedi_cmd * command`)`;

## Description

The function `comedi_command` starts a streaming input or output. The command structure pointed to by `command` specifies settings for the acquisition. The command must be able to pass `comedi_command_test` with a return value of `0`, or `comedi_command` will fail. For input subdevices, sample values are read using the function `read` on the device file descriptor. For output subdevices, sample values are written using the function `write`.

## Return value

On success, `0` is returned. On failure, `-1` is returned.

Prev | Up | Next
comedi_cancel | Home | comedi_command_test