- From: Farhan Rizwi <farhan.rizwi_at_unswalumni.com>
- Date: Tue, 1 Aug 2006 13:37:46 +1000
On Mon, 31 Jul 2006 08:37 pm, Ian Abbott wrote: > On 28/07/06 23:42, Farhan Rizwi wrote: > > On Fri, 28 Jul 2006 08:16 pm, you wrote: > >> Which driver are you using? I cannot see any driver in the standard > >> Comedi package that includes support for multiqpci. The closest match > >> is the multiq3 driver, but that one is for an ISA card, not a PCI card. > > > > A few years ago someone in my lab ported it from Windows. Its attached. > > Do they still work there and can they fix it, or has it been dumped on > you to get working? No they don't work here anymore. > I suggest you rewrite the parts of the driver that use the above types > COUNTER_SETUP, CRB_LAYOUT, and CRA_LAYOUT to avoid the use of > bit-fields. Using bit-fields to describe hardware register layouts is > not a good idea because they are inherently non-portable for externally > defined layouts. In fact, the order of the bits in the above types > appears to be the reverse of what it should be for gcc on i386. Perhaps > it was originally ported to an architecture that lays the bit-fields out > MSB-first. Besides, the driver code currently uses a confusing mixture > of bit-fields and bit-wise logical and shift operations, so changing the > code to avoid bit-fields would make it easier to understand. I understand what you're saying but if this is the same code (there is some confusion on this) that is being executed on win32 then the bits ought to line up in linux too, right? Unless of course, Borland compiles differently to gcc. In any case, the counters seem to be working okay, its the Analog input I'm having trouble with. I thought the DMABuffer might have an issue with struct alignment as m_pBuffer is declared as uint8 and then cast to uint32 everywhere else but I'm not sure. ReadADC simply accesses a bit of the DMA buffer so unless that pointer is initialized incorrectly, I don't know where else to look. -Farhan
Received on 2006-08-01Z02:37:46