error: too many arguments to function ‘comedi_to_phys’

hello they can help me with this error that marks when
compiling an application  

root_at_alejandro-desktop:/root/proyecto# gcc inp0.c
-lcomedi -lm -o inp0
inp0.c: In function ‘main’:
inp0.c:21: error: dereferencing pointer to incomplete
type
inp0.c:22: warning: passing argument 2 of
‘comedi_to_phys’ makes pointer from integer without a
cast
inp0.c:22: error: too many arguments to function
‘comedi_to_phys’
root_at_alejandro-desktop:/root/proyecto# 


#include <stdio.h> /* for printf() */
#include <comedi.h> /* also included by comedilib.h */
#include <comedilib.h> /* 'cuz we're using comedilib*/
int subdev = 0;         /* change this to your input
subdevice */
int chan = 0;           /* change this to your channel
*/
int range = 0;          /* more on this later */
int aref = 0;           /* more on this later */
int main(int argc,char *argv[])
{
comedi_t *cf;
         int chan=0;
         lsampl_t data;
   int maxdata,rangetype;
   double volts;

         cf=comedi_open("/dev/comedi0");
   maxdata=comedi_get_maxdata(cf,subdev,chan);

   rangetype=comedi_get_rangetype(cf,subdev,chan);


comedi_data_read(cf->fd,subdev,chan,range,aref,&data);
volts=comedi_to_phys(data,rangetype,range,maxdata);
       printf("%d %g\n",data,volts);
        return 0;
 }


root_at_alejandro-desktop:/root/proyecto# gcc inp0.c
-lcomedi -lm -o inp0
inp0.c: In function ‘main’:
inp0.c:21: error: dereferencing pointer to incomplete
type
inp0.c:22: warning: passing argument 2 of
‘comedi_to_phys’ makes pointer from integer without a
cast
inp0.c:22: error: too many arguments to function
‘comedi_to_phys’
root_at_alejandro-desktop:/root/proyecto# 





__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.espanol.yahoo.com/ 

Received on 2007-08-20Z18:31:44