3 comedi library routines
5 COMEDI - Linux Control and Measurement Device Interface
6 Copyright (C) 1997-8 David A. Schleef <ds@stm.lbl.gov>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #include <sys/types.h>
31 #include <sys/ioctl.h>
36 #include <libinternal.h>
41 int ioctl_devinfo(int fd,comedi_devinfo *it)
43 return ioctl(fd,COMEDI_DEVINFO,it);
46 int ioctl_subdinfo(int fd,comedi_subdinfo *it)
48 return ioctl(fd,COMEDI_SUBDINFO,it);
51 int ioctl_chaninfo(int fd,unsigned int subdev,lsampl_t *maxdata_list,unsigned int *flaglist,unsigned int *rangelist)
57 ci.rangelist=rangelist;
58 ci.maxdata_list=maxdata_list;
60 return ioctl(fd,COMEDI_CHANINFO,&ci);
63 int ioctl_trigger(int fd,comedi_trig *it)
65 return ioctl(fd,COMEDI_TRIG,it);
68 #ifdef HAVE_COMEDI_CMD
69 int ioctl_cmd(int fd,comedi_cmd *it)
71 return ioctl(fd,COMEDI_CMD,it);
75 int ioctl_lock(int fd,int subdevice)
77 return ioctl(fd,COMEDI_LOCK,subdevice);
80 int ioctl_unlock(int fd,int subdevice)
82 return ioctl(fd,COMEDI_UNLOCK,subdevice);
85 int ioctl_cancel(int fd,int subdevice)
87 return ioctl(fd,COMEDI_CANCEL,subdevice);
90 int ioctl_rangeinfo(int fd,int range_type,comedi_krange *range_ptr)
94 it.range_type=range_type;
95 it.range_ptr=range_ptr;
97 return ioctl(fd,COMEDI_RANGEINFO,&it);