From 9bd59e1defbd33edbe180c9e604d5433902a2134 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Thu, 3 May 2012 19:56:59 +0100 Subject: [PATCH] doc/other.xml: Moved a few tags around and minor changes. Moved tags inside , , etc. tags so fonts stay a bit more consistent. --- doc/other.xml | 136 +++++++++++++++++++++++++------------------------- 1 file changed, 67 insertions(+), 69 deletions(-) diff --git a/doc/other.xml b/doc/other.xml index 16b6885..b530616 100644 --- a/doc/other.xml +++ b/doc/other.xml @@ -56,8 +56,8 @@ digital subdevices on a particular board. Individual bits on a digital I/O device can be read and written using -the functions comedi_dio_read -and comedi_dio_write: +the functions comedi_dio_read +and comedi_dio_write: int comedi_dio_read @@ -86,7 +86,7 @@ contains the value of the acquired bit. The direction of bidirectional lines can be configured using the function -comedi_dio_config: +comedi_dio_config: int comedi_dio_config @@ -106,7 +106,7 @@ the entire block. Multiple channels can be read and written simultaneously using the -function comedi_dio_bitfield2: +function comedi_dio_bitfield2: int comedi_dio_bitfield2 @@ -165,7 +165,7 @@ the range of, typically, 8, 10, 12, or 16 bits. Single samples can be read from an analog channel using the function -comedi_data_read: +comedi_data_read: int comedi_data_read @@ -184,7 +184,7 @@ the user-specified data buffer. In the opposite direction, single samples can be written to an analog output channel using the function -comedi_data_write: +comedi_data_write: int comedi_data_write @@ -201,7 +201,7 @@ channel using the function Raw data values read or written by the above functions are unsigned integers less than, or equal to, the maximum sample value of the channel, which can be determined using the function -comedi_get_maxdata: +comedi_get_maxdata: lsampl_t comedi_get_maxdata @@ -212,8 +212,8 @@ of the channel, which can be determined using the function Conversion between raw data values and uncalibrated physical units can be performed by the functions -comedi_to_phys -and comedi_from_phys: +comedi_to_phys +and comedi_from_phys: double comedi_to_phys @@ -237,7 +237,7 @@ self-explanatory: -comedi_t: this data structure +comedi_t: this data structure contains all information that a user program has to know about an open &comedi; device. The programmer doesn't have to fill in this data structure manually: it gets filled in by opening @@ -247,7 +247,7 @@ the device. -lsampl_t: this +lsampl_t: this data structure represents one single sample. On most architectures, it's nothing more than a 32 bits value. Internally, &comedi; does some conversion from raw sample data to @@ -260,14 +260,12 @@ munging. Each single acquisition by, for example, - - comedi_data_read() - +comedi_data_read requires quite some overhead, because all the arguments of the function call are checked. If multiple acquisitions must be done on the same channel, this overhead can be avoided by using a function that can read more than one sample, -comedi_data_read_n: +comedi_data_read_n: int comedi_data_read_n @@ -287,7 +285,7 @@ because the call is blocking. The start of the a single data acquisition can also be delayed by a specified number of nano-seconds using the function -comedi_data_read_delayed: +comedi_data_read_delayed: int comedi_data_read_delayed @@ -342,7 +340,7 @@ The instruction data structure All the information needed to execute an instruction is stored in the -comedi_insn +comedi_insn data structure: typedef struct comedi_insn_struct { @@ -418,7 +416,7 @@ Instruction execution Once an instruction data structure has been filled in, the corresponding instruction is executed with the function -comedi_do_insn: +comedi_do_insn: int comedi_do_insn @@ -428,12 +426,12 @@ corresponding instruction is executed with the function Many &comedi; instructions are shortcuts that relieve the programmer from explicitly filling in the data structure and calling the -comedi_do_insn +comedi_do_insn function. A list of instructions can be executed in one function call using the function -comedi_do_insnlist: +comedi_do_insnlist: int comedi_do_insnlist @@ -442,7 +440,7 @@ A list of instructions can be executed in one function call using the function The parameter list is a pointer to a -comedi_insnlist +comedi_insnlist data structure holding a pointer to an array of comedi_insn and the number of instructions in the list: @@ -478,7 +476,7 @@ to be specified via the data buffer of the instruction data structure. (So, the pointer to a -lsampl_t +lsampl_t is misused as a pointer to an array with board-specific information.) @@ -491,7 +489,7 @@ indicates that the instruction will channel, but will configure that channel. The chanspec field in the -comedi_insn +comedi_insn data structure, contains the channel to be configured. The zeroth element of the data array is always an id that specifies @@ -523,7 +521,7 @@ each type of configuration instruction. INSN_CONFIG_DIO_INPUT Configure a DIO line as input. It is easier to use -comedi_dio_config() +comedi_dio_config than to use this configuration instruction directly. 1 @@ -535,7 +533,7 @@ n/a INSN_CONFIG_DIO_OUTPUT Configure a DIO line as output. It is easier to use -comedi_dio_config() +comedi_dio_config than to use this configuration instruction directly. 1 @@ -551,7 +549,7 @@ programs to configure analog input channels which can be redirected to read internal calibration references. You need to set the CR_ALT_SOURCE flag in the chanspec when reading to actually read from the configured alternate input source. -If you are using comedi_data_read(), then the channel parameter can be +If you are using comedi_data_read, then the channel parameter can be bitwise or'd with the CR_ALT_SOURCE flag. 2 @@ -581,7 +579,7 @@ acts purely as a query if the block size is set to zero. Queries the configuration of a DIO line to see if it is an input or output. It is probably easier to use the comedilib function -comedi_dio_get_config() +comedi_dio_get_config than to use this instruction directly. 2 @@ -706,7 +704,7 @@ Executing a command A command is executed by the function -comedi_command: +comedi_command: int comedi_command @@ -715,14 +713,14 @@ A command is executed by the function The following sections explain the meaning of the -comedi_cmd data structure. +comedi_cmd data structure. Filling in this structure can be quite complicated, and requires good knowledge about the exact functionalities of the DAQ card. So, before launching a command, the application programmer is adviced to check whether this complex command data structure can be successfully parsed. So, the typical sequence for executing a command is to first send the command through -comedi_command_test() +comedi_command_test once or twice. The test will check that the command is valid for the particular device, and often makes some adjustments to the command arguments, which can then be read back by the user to see the actual @@ -731,7 +729,7 @@ values used. A &comedi; program can find out on-line what the command capabilities of a specific device are, by means of the -comedi_get_cmd_src_mask() +comedi_get_cmd_src_mask function. @@ -745,7 +743,7 @@ The command data structure The command executes according to the information about the requested acquisition, which is stored in the -comedi_cmd +comedi_cmd data structure: typedef struct comedi_cmd_struct comedi_cmd; @@ -787,18 +785,18 @@ so-called event. More on these in The subdev member of the -comedi_cmd structure is +comedi_cmd structure is the index of the subdevice the command is intended for. The -comedi_find_subdevice_by_type() +comedi_find_subdevice_by_type function can be useful in discovering the index of your desired subdevice. The chanlist member of the -comedi_cmd data +comedi_cmd data structure should point to an array whose number of elements is -specificed by +specified by chanlist_len (this will generally be the same as the scan_end_arg). @@ -809,7 +807,7 @@ 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() +CR_PACK macro. @@ -825,7 +823,7 @@ the buffer where the driver should write/read its data to/from. The final member of the -comedi_cmd structure is the +comedi_cmd structure is the flags field, i.e., bits in a word that can be bitwise-or'd together. The meaning of these bits are explained in a @@ -852,22 +850,22 @@ start a scan, start a conversion, stop a scan, and stop the acquisition. Each event can be given its own source -(the *_src members in the -comedi_cmd data +(the …_src members in the +comedi_cmd data structure). And each event source can have a corresponding -argument (the *_arg members of -the comedi_cmd data +argument (the …_arg members of +the comedi_cmd data structure) whose meaning depends on the type of source trigger. For example, to specify an external digital line 3 as a source (in general, any of the five event sources), you would use -src=TRIG_EXT +src=TRIG_EXT and arg=3. The following paragraphs discuss in somewhat more detail the trigger -event sources(*_src), and the -corresponding arguments (*_arg). +event sources(…_src), and the +corresponding arguments (…_arg). The start of an acquisition is controlled by the @@ -912,8 +910,8 @@ chooses the particular digital line. TRIG_INT: the start event occurs on a &comedi; internal signal, which is typically caused by an -INSN_INTTRIG -instruction. +INSN_INTTRIG +instruction. @@ -965,12 +963,12 @@ The scan_begin_arg used here may not be supported exactly by the device, but it will be adjusted to the nearest supported value by -comedi_command_test(). +comedi_command_test. The timing between each sample in a scan is controlled by the -convert_* +convert_… fields: @@ -1008,7 +1006,7 @@ chooses the particular digital line. The end of each scan is almost always specified using -TRIG_COUNT, +TRIG_COUNT, with the argument being the same as the number of channels in the chanlist. You could probably find a device that allows something else, but it would @@ -1038,7 +1036,7 @@ scans. TRIG_NONE: perform continuous acquisition, until stopped using -comedi_cancel(). +comedi_cancel. Its argument is reserved and should be set to 0. @@ -1073,7 +1071,7 @@ This event can be useful as any of the trigger sources. Its exact meaning is driver specific, because it implements a feature that otherwise does not fit into the generic &comedi; command interface. Configuration of TRIG_OTHER features are done by -INSN_CONFIG +INSN_CONFIG instructions. @@ -1086,7 +1084,7 @@ Not all event sources are applicable to all events. Supported trigger sources for specific events depend significantly on your particular device, and even more on the current state of its device driver. The -comedi_get_cmd_src_mask() +comedi_get_cmd_src_mask function is useful for determining what trigger sources a subdevice supports. @@ -1212,7 +1210,7 @@ device that could do either input or output. TRIG_CONFIG: perform configuration, not triggering. This is a legacy of the deprecated -comedi_trig_struct +comedi_trig_struct data structure, and has no function at present. @@ -1327,8 +1325,8 @@ inputs: unsigned int channel -The above function comedi_sv_init initializes the -comedi_sv_t data structure, used +The above function comedi_sv_init initializes the +comedi_sv_t data structure, used to do the averaging acquisition: typedef struct comedi_sv_struct { @@ -1348,7 +1346,7 @@ typedef struct comedi_sv_struct { The actual acquisition is done with the function -comedi_sv_measure: +comedi_sv_measure: int comedi_sv_measure @@ -1357,7 +1355,7 @@ The actual acquisition is done with the function The number of samples over which the function -comedi_sv_measure() averages is limited by the +comedi_sv_measure averages is limited by the implementation (currently the limit is 100 samples). @@ -1581,7 +1579,7 @@ application will use to configure an extended trigger, and a command, specifying -TRIG_OTHER +TRIG_OTHER as one of the trigger sources. @@ -1655,7 +1653,7 @@ Analog Triggering -(Status: alpha. The ni_mio_common.c driver +(Status: alpha. The ni_mio_common.c driver implements this feature.) @@ -1860,14 +1858,14 @@ encoders, etc. Counters can be operated either in synchronous mode (using -INSN_READ) +INSN_READ) or asynchronous mode (using commands), similar to analog input subdevices. The input signal for both modes is the accumulator. Commands on counter subdevices are almost always specified using scan_begin_src -= TRIG_OTHER, += TRIG_OTHER, with the counter configuration also serving as the extended configuration for the scan begin source. @@ -1936,8 +1934,8 @@ transitions of the source signals. data[4] determine the primary source for the counter, similar to the -_src and the -_arg fields +…_src and the +…_arg fields used in the command data structure. @@ -1971,8 +1969,8 @@ The ni_pcimio, ni_atmio, and as a digital I/O subdevice (subdevice number 10). -The functions comedi_dio_config() and -comedi_dio_get_config() can be used on +The functions comedi_dio_config and +comedi_dio_get_config can be used on the RTSI subdevice to set/query the direction (input or output) of each of the RTSI lines individually. @@ -2005,7 +2003,7 @@ Use the board's internal oscillator. Use the RTSI line 7 as the master clock. This source is only supported on pre-m-series boards. The newer m-series boards -use NI_MIO_PLL_RTSI_CLOCK() instead. +use NI_MIO_PLL_RTSI_CLOCK instead. @@ -2148,8 +2146,8 @@ signal. The RTSI bus pins may be used as trigger inputs for many of the &comedi; trigger functions. To use the RTSI bus pins, set the source to be TRIG_EXT and the source argument using the return values -from the NI_EXT_RTSI() function (or similarly the -NI_EXT_PFI() function if you want +from the NI_EXT_RTSIn function (or similarly the +NI_EXT_PFIn function if you want to trigger from a PFI line). The CR_EDGE and CR_INVERT flags may also be set on the trigger source argument to specify edge and -- 2.26.2