Re: how to initial driver by comedi_config -i?

ÔÚ 2002-10-08 ¶þ µÄ 13:24£¬ David Schleef дµÀ£º
> On Tue, Oct 08, 2002 at 08:07:02AM +0800, Edwin du wrote:
> > Hi all,
> > 	I was writing a driver that need some initial parameters when
> > attaching. I noticed that comedi_config could use a file to initialize
> > driver, using comedi_config -i.
> > 	The question is how can I get the file data in my driver? In
> > comedi_config.c, 
> > 	it->options[0]=init_data;
> > 	file data is stored in comedi_devconfig *it. But when attaching how can
> > I tell the difference between this it->options[0] and other
> > it->options[0] which specifies pci bus?
> 
> Use options[2] and options[3] for the bus and slot.  Since option
> lists are required to be documented, it's really not a problem
> that it's inconsistent.
> 
> 
> 
> dave...
> 
Thanks...

when I was reading a data from file, it->options[0] gives me a very
strange number. According to comedilib-0.7.16, comedi_config.c line 260,
it->options[0]=(int)init_data;
init_data is void *, while it->options[0] is of type int. Is there any
bug here?

Received on 2002-10-08Z15:48:00