- From: asgard <asgard_at_etersoft.ru>
- Date: Tue, 13 Jun 2006 17:44:09 +0400
Ian Abbott wrote: > On 06/06/2006 14:34, asgard wrote: >> hi, all. >> >> i am writting comedi-driver for unioxx-5 isa card with digital and >> analog i/o. and i have some probems with it. >> when i defined subdevice type in comedi_subdevice structure for >> digital i/o, i used COMEDI_SUBD_DIO constant; >> but i need constant with the same content semantic for analog i/o. >> for example something like COMEDI_SUBD_AIO >> but in comedi.h i found only COMEDI_SUBD_AI and COMEDI_SUBD_AO. >> >> have you any ideas how to solve this little problem? > > Unless it is a really unusual device (and I can't read Russian, so I > don't know how unusual it is), you should add 2 subdevices: one for AO > and one for AI. > this card has 4 _identical_ subdevices and each of them can be analog or digital, more over each can work in input _and_ output mode. so, when i want to read or write some data, i _must_ use one base address for this operations and one channels range. it might be a situation, when all 4 subdevices will be analog. and if i add 2 'pseudo' subdevices for input and output on each 'real', i'll get 8 subdevice. i think that this situation can cause some conflicts between two 'pseudo' subdevices. card description: base address 0xA110 (ba) 4 subdevicess: 1) ba (sd_ba1) 2) ba + 0x400 (sd_ba2) 3) ba + 0x400 * 2 (sd_ba3) 4) ba + 0xA000 + 0x400 * 3 (sd_ba4) each subdevice has 24 _digital_ channels (0 .. 23) sd_baN+ 1 (channels from 0 to 7) sd_baN+ 2 (channels from 8 to 15) sd_baN + 3 (channels from 16 to 23) (where 1 <= N <= 3 ) for digital output - write 1 to given channel for digital input - write 0 to given channel for analog input/output even сhannels(0 2 4 6 8 .. 22) must be readjustmented for output, and all odd(1 3 4 5 7 .. 23) for input. after this i have 12 analog channels which can be used as input or output. so this situation can be problematic.
Received on 2006-06-13Z12:44:09