From: Ian Abbott Date: Wed, 9 May 2012 11:32:05 +0000 (+0100) Subject: doc/dio_funcref.txt: Some DocBook mark-up changes. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=32047d460bac65336095647c38268d02d6f54c06;p=comedilib.git doc/dio_funcref.txt: Some DocBook mark-up changes. --- diff --git a/doc/dio_funcref.txt b/doc/dio_funcref.txt index ffe2e2e..765980f 100644 --- a/doc/dio_funcref.txt +++ b/doc/dio_funcref.txt @@ -7,28 +7,32 @@ Param: unsigned int write_mask Param: unsigned int * bits Param: unsigned int base_channel Description: - The function comedi_dio_bitfield2() allows multiple channels to + The function comedi_dio_bitfield2 + allows multiple channels to be read or written together on a digital input, output, or configurable digital I/O device. - The parameter write_mask - and the value pointed to by bits + The parameter write_mask + and the value pointed to by bits are interpreted as bit fields, with the least significant bit - representing channel base_channel. - For each bit in write_mask that is - set to 1, the cooresponding bit in *bits + representing channel base_channel. + For each bit in write_mask that is + set to 1, the corresponding bit in + *bits is written to the digital output channel. After writing all the output channels, each channel is read, and the result placed in the approprate bits in - *bits. The result of - reading an output channel is the last - value written to the output channel. + *bits. + The result of reading an output channel is the last value written to the + output channel. All the channels might not be read or written at the exact same time. For example, the driver may need to sequentially write to several registers in order to set all the digital channels specified - by the write_mask. + by the write_mask + and base_channel parameters. Returns: - If successful, 0 is returned, otherwise -1. + If successful, 0 is returned, otherwise + -1. Function: comedi_dio_config -- change input/output properties of channel Retval: int @@ -37,18 +41,19 @@ Param: unsigned int subdevice Param: unsigned int channel Param: unsigned int direction Description: - The function comedi_dio_config() configures individual channels + The function comedi_dio_config configures individual channels in a digital I/O subdevice to be either input or output, depending - on the value of direction. Valid directions are - COMEDI_INPUT or COMEDI_OUTPUT. + on the value of direction. Valid directions are + COMEDI_INPUT or COMEDI_OUTPUT. Depending on the characteristics of the hardware device, multiple channels might be grouped together in hardware when configuring the input/output direction. In this - case, a single call to comedi_dio_config() for any channel in the - group will affect the entire group. + case, a single call to comedi_dio_config + for any channel in the group will affect the entire group. Returns: - If successful, 0 is returned, otherwise -1. + If successful, 0 is returned, otherwise + -1. Function: comedi_dio_get_config -- query input/output properties of channel Retval: int @@ -57,14 +62,17 @@ Param: unsigned int subdevice Param: unsigned int channel Param: unsigned int * direction Description: - The function comedi_dio_get_config() querys the input/output configuration of + The function comedi_dio_get_config queries the input/output configuration of an individual channel in a digital I/O subdevice (see - comedi_dio_config). - On success, *direction will - be set to either COMEDI_INPUT or COMEDI_OUTPUT. + comedi_dio_config). + On success, *direction will + be set to either COMEDI_INPUT or + COMEDI_OUTPUT. Returns: - If successful, 0 is returned, otherwise -1. + If successful, 0 is returned, otherwise + -1. Function: comedi_dio_read -- read single bit from digital channel Retval: int @@ -73,12 +81,15 @@ Param: unsigned int subdevice Param: unsigned int channel Param: unsigned int * bit Description: - The function comedi_dio_read reads the channel channel + The function comedi_dio_read reads the channel + channel belonging to the - subdevice subdevice of device device. + subdevice subdevice of device + device. The data value that is - read is stored in the *bit. This function - is equivalent to: + read is stored in the + *bit. + This function is equivalent to: comedi_data_read(device, subdevice, channel, 0, 0, bit); @@ -87,11 +98,12 @@ Description: If you wish to read multiple digital channels at once, it is more efficient to use - comedi_dio_bitfield2 + comedi_dio_bitfield2 than to call this function multiple times. Returns: Return values and errors are the same as - comedi_data_read. + comedi_data_read. Function: comedi_dio_write -- write single bit to digital channel Retval: int @@ -100,21 +112,22 @@ Param: unsigned int subdevice Param: unsigned int channel Param: unsigned int bit Description: - The function writes the value bit to the channel - channel belonging - to the subdevice subdevice of device - device. This function + The function writes the value bit to the channel + channel belonging + to the subdevice subdevice of device + device. This function is equivalent to: - comedi_data_write(device, subdevice, channel, 0, 0, bit); + comedi_data_write(device, subdevice, channel, 0, 0, bit); This function does not require a digital subdevice or a subdevice with a maximum data value of 1 to work properly. If you wish to write multiple digital channels at once, it is more efficient to use - comedi_dio_bitfield2 + comedi_dio_bitfield2 than to call this function multiple times. Returns: Return values and errors are the same as - comedi_data_write. + comedi_data_write.