diff --git a/doc/comedilib-1.html b/doc/comedilib-1.html index 67d8b0f..186db2e 100644 --- a/doc/comedilib-1.html +++ b/doc/comedilib-1.html @@ -1,7 +1,7 @@ - + Comedi Documentation: Introduction diff --git a/doc/comedilib-2.html b/doc/comedilib-2.html index b54ebc0..eec5825 100644 --- a/doc/comedilib-2.html +++ b/doc/comedilib-2.html @@ -1,7 +1,7 @@ - + Comedi Documentation: Installation and configuration diff --git a/doc/comedilib-3.html b/doc/comedilib-3.html index 1becb2b..cc2b1d4 100644 --- a/doc/comedilib-3.html +++ b/doc/comedilib-3.html @@ -1,7 +1,7 @@ - + Comedi Documentation: Individual drivers diff --git a/doc/comedilib-4.html b/doc/comedilib-4.html index e8fa9e5..c054c5c 100644 --- a/doc/comedilib-4.html +++ b/doc/comedilib-4.html @@ -1,7 +1,7 @@ - + Comedi Documentation: Writing programs that use comedi and comedilib diff --git a/doc/comedilib-5.html b/doc/comedilib-5.html index 311824d..6267789 100644 --- a/doc/comedilib-5.html +++ b/doc/comedilib-5.html @@ -1,7 +1,7 @@ - + Comedi Documentation: Application-specific functions @@ -102,7 +102,7 @@ is only accurate to part-per-thousand.

-

5.3 Commands +

5.3 Commands

@@ -124,7 +124,7 @@ A/D or D/A conversion. The start and end of the sequence, and the start and end of each scan, and each conversion is called an event.

Each of these 5 types of events are caused by a triggering -source, specified through the *_src members of the +source, specified through the *_src members of the comedi_cmd structure. The source types are:

+

Not all triggers are applicable to all events. Supported triggers +for specific events depend significantly on your particular +device. The +comedi_get_cmd_src_mask() +function is useful for determining what triggers a subdevice supports.

For every trigger, there is a corresponding -argument (the *_arg members of the +argument (the *_arg members of the comedi_cmd structure) whose meaning depends on the type of trigger. The meanings of the arguments are as follows:

- -

Not all triggers are applicable to all events. Supported triggers -for specific events depends significantly on your particular -device.

-

TRIG_NONE is typically used only as a stop_src. The arg for TRIG_NONE +

TRIG_NONE is typically used only as a stop_src. The argument for TRIG_NONE is reserved and should be set to 0.

-

TRIG_NOW is most often used as a start_src. The arg for TRIG_NOW is +

TRIG_NOW is most often used as a start_src. The argument for TRIG_NOW is the number of nanoseconds between when the command is issued and when -the event should occur. In the case of using TRIG now as a start_src, +the event should occur. In the case of using TRIG now as a start_src, it indicates a delay between issuing the command and the start of acquisition. Most drivers only support a delay of 0.

TRIG_FOLLOW is a special type of trigger for events that trigger on the completion of some other, logically connected event. The argument is reserved and should be set to 0. When used -as a scan_begin_src, it indicates that a trigger should occur as a +as a scan_begin_src, it indicates that a trigger should occur as a logical continuation of convert events. This is done in order to properly describe boards that do not have separate timers for -convert and scan_begin events. When used as a start_src for analog +convert and scan_begin events. When used as a start_src for analog output subdevices, it indicates that conversion of output samples should begin when samples are written to the buffer.

TRIG_TIME is reserved for future use.

-

TRIG_TIMER is most often used as a convert_src, a scan_begin_src, or +

TRIG_TIMER is most often used as a convert_src, a scan_begin_src, or both. It indicates that triggers should occur at a specific rate. The argument specifies the interval between triggers in nanoseconds.

-

TRIG_COUNT is used for scan_end_src and stop_src. It indicates that +

TRIG_COUNT is used for scan_end_src and stop_src. It indicates that a trigger should occur when the specified number of corresponding lower-level triggers (convert and scan_begin, respectively) occur. The argument is the count of lower-level triggers.

@@ -178,7 +179,7 @@ The exact meaning of digital line is device-dependent. Some devices have one dedicated line, others may allow generic digital input lines to be used. The argument indicates the particular external line to use as the trigger.

-

TRIG_INT is typically used as a start_src. This trigger occurs when +

TRIG_INT is typically used as a start_src. This trigger occurs when the application performs an INSN_INTTRIG instruction. Using TRIG_INT is a method by which the application can accurately record the time of the start of acquisition, since the parsing and setup time of a @@ -189,18 +190,26 @@ meaning of TRIG_OTHER is driver-specific, and implements a feature that otherwise does not fit into the command interface. Configuration of TRIG_OTHER features are done by INSN_CONFIG insns. The argument is reserved and should be set to 0.

- -

The chanlist member of the +

Ths subdev member of the comedi_cmd -structure should point to an array whose number of elements is specificed by chanlist_len +structure is the index of the subdevice the command is intended for. The +comedi_find_subdevice_by_type() +function can be useful in discovering the index of your desired subdevice.

+

The chanlist member of the +comedi_cmd +structure should point to an array whose number of elements is specificed by chanlist_len (this will generally be the same as the scan_end_arg). The chanlist specifies the sequence of channels and gains (and analog references) that should be stepped through for each scan. The elements of the chanlist array should be initialized by packing the channel, range and reference information together with the -CR_PACK(channel, range, aref) macro.

+CR_PACK() macro.

+

The data and data_len members can be safely ignored when issueing commands +from a user-space program. They only have meaning when a command is sent from a kernel +module using the kcomedilib interface, in which case they specify the buffer where +the driver should write/read its data to/from.

The final member of the -comedi_cmd structure is 'flags'. +comedi_cmd structure is flags. The following flags are valid, and can be bitwise-or'd together.