- From: Richard Bytheway <Richard.Bytheway_at_bede.co.uk>
- Date: Fri, 15 Nov 2002 12:04:48 -0000
OK, my wrong.
I hadn't successfully rebuilt the module with my latest changes.
Duh!
Works now. If only I could change between BP and UP in software.
Richard
> -----Original Message-----
> From: Richard Bytheway
> Sent: 15 November 2002 11:48 am
> To: 'comedi_at_comedi.org'
> Subject: AI Ranges
>
>
> I am trying to get my PCIM-DAS1602 driver to support software
> selection of ranges, however, I cannot make sense of how the
> range selection mechanism is supposed to work.
>
> I have tried to copy the cb_pcidas driver, since this is a
> similar card.
>
> I have a pointer to a comedi_lrange in my device details:
>
> typedef struct cb_pcimdas_board_struct
> {
> <snip>
> comedi_lrange *ranges;
> } cb_pcimdas_board;
>
> and set this to a pointer to an array of ranges:
>
> static comedi_lrange cb_pcimdas_ranges =
> { 8,
> { BIP_RANGE(10),
> BIP_RANGE(5),
> BIP_RANGE(2.5),
> BIP_RANGE(1.25),
> UNI_RANGE(10),
> UNI_RANGE(5),
> UNI_RANGE(2.5),
> UNI_RANGE(1.25)
> }
> };
>
> static cb_pcimdas_board cb_pcimdas_boards[] =
> {
> {
> <snip>
> ranges: &cb_pcimdas_ranges,
> },
> };
>
>
> As far as I can see, this is all that is done in the cb_pcidas driver.
>
> I use comedilib/demo/inp.c to test:
> $ ./inp -s0 -c0
> 16811
> $ ./inp -s0 -c0 -r0
> 16810
> $ ./inp -s0 -c0 -r1
> bad chanlist[0]=0x00010000 n_chan=16 range length=1
> /dev/comedi0: Success
> $
>
> I don't understand this error message. Yes, there are only 16
> channels, but I am asking for channel 0, which works without -r1.
>
> What am I missing?
>
>
> Richard Bytheway
>
Received on 2002-11-15Z12:04:48