From: Ian Abbott Date: Wed, 2 May 2012 11:54:46 +0000 (+0100) Subject: doc/other.xml: Use comedi_dio_bitfield2 instead of comedi_dio_bitfield. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6892b4046874e107778b927da927d47e1566a3a4;p=comedilib.git doc/other.xml: Use comedi_dio_bitfield2 instead of comedi_dio_bitfield. Rework text to use comedi_dio_bitfield2 as comedi_dio_bitfield is marked as deprecated elsewhere in the document. --- diff --git a/doc/other.xml b/doc/other.xml index 9486205..cbac5f3 100644 --- a/doc/other.xml +++ b/doc/other.xml @@ -108,27 +108,37 @@ Multiple channels can be read and written simultaneously using the function -int comedi_dio_bitfield +int comedi_dio_bitfield2 comedi_t *device unsigned int subdevice unsigned int write_mask unsigned int *bits +unsigned int base_channel -Each channel is assigned to a bit in the +Each channel from base_channel +to base_channel + +31 is assigned to a bit in the write_mask and bits -bitfield. If a bit in +bitfield with bit 0 assigned to channel +base_channel, bit 1 assigned to channel +base_channel + +1, etc. If a bit in write_mask is set, the corresponding bit in *bits will -be written to the corresponding digital output line. +be written to the digital output line corresponding to the channel given by +base_channel plus the bit number. Each digital line is then read and placed into *bits. The value of bits in *bits corresponding to digital output lines is undefined and device-specific. Channel -0 is the least significant bit in the bitfield; -channel 31 is the most significant bit. Channels -higher than 31 cannot be accessed using this method. +base_channel + +0 is the least significant bit in the bitfield. No +more than 32 channels at once can be accessed using this method. +Warning! Older versions of &comedi; +may ignore base_channel and treat +it as 0 unless the subdevice has more than 32 channels.