From: David Schleef Date: Thu, 25 Apr 2002 21:52:57 +0000 (+0000) Subject: Changed to use comedi_t * instead of int for device token X-Git-Tag: r0_7_65~85 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=008b8d0b1518d6f11f757b3f62a3e8ac6976822e;p=comedi.git Changed to use comedi_t * instead of int for device token --- diff --git a/include/linux/comedilib.h b/include/linux/comedilib.h index b99198f9..62d051fa 100644 --- a/include/linux/comedilib.h +++ b/include/linux/comedilib.h @@ -43,6 +43,80 @@ /* exported functions */ +#ifndef KCOMEDILIB_DEPRECATED + +typedef void comedi_t; + +/* these functions may not be called at real-time priority */ + +comedi_t *comedi_open(const char *path); +int comedi_close(comedi_t *dev); + +/* these functions may be called at any priority, but may fail at + real-time priority */ + +int comedi_lock(comedi_t *dev,unsigned int subdev); +int comedi_unlock(comedi_t *dev,unsigned int subdev); + +/* these functions may be called at any priority, but you must hold + the lock for the subdevice */ + +int comedi_cancel(comedi_t *dev,unsigned int subdev); +int comedi_register_callback(comedi_t *dev,unsigned int subdev, + unsigned int mask,int (*cb)(unsigned int,void *),void *arg); + +int comedi_command(comedi_t *dev,comedi_cmd *cmd); +int comedi_command_test(comedi_t *dev,comedi_cmd *cmd); +int comedi_trigger(comedi_t *dev,unsigned int subdev,comedi_trig *it); +int __comedi_trigger(comedi_t *dev,unsigned int subdev,comedi_trig *it); +int comedi_data_write(comedi_t *dev,unsigned int subdev,unsigned int chan, + unsigned int range,unsigned int aref,lsampl_t data); +int comedi_data_read(comedi_t *dev,unsigned int subdev,unsigned int chan, + unsigned int range,unsigned int aref,lsampl_t *data); +int comedi_dio_config(comedi_t *dev,unsigned int subdev,unsigned int chan, + unsigned int io); +int comedi_dio_read(comedi_t *dev,unsigned int subdev,unsigned int chan, + unsigned int *val); +int comedi_dio_write(comedi_t *dev,unsigned int subdev,unsigned int chan, + unsigned int val); +int comedi_dio_bitfield(comedi_t *dev,unsigned int subdev,unsigned int mask, + unsigned int *bits); +int comedi_get_n_subdevices(comedi_t *dev); +int comedi_get_version_code(comedi_t *dev); +char *comedi_get_driver_name(comedi_t *dev); +char *comedi_get_board_name(comedi_t *dev); +int comedi_get_subdevice_type(comedi_t *dev,unsigned int subdevice); +int comedi_find_subdevice_by_type(comedi_t *dev,int type,unsigned int subd); +int comedi_get_n_channels(comedi_t *dev,unsigned int subdevice); +lsampl_t comedi_get_maxdata(comedi_t *dev,unsigned int subdevice,unsigned + int chan); +int comedi_get_n_ranges(comedi_t *dev,unsigned int subdevice,unsigned int + chan); +int comedi_do_insn(comedi_t *dev,comedi_insn *insn); +int comedi_poll(comedi_t *dev, unsigned int subdev); + + +/* DEPRECATED functions */ +int comedi_get_rangetype(comedi_t *dev,unsigned int subdevice,unsigned int chan); + + +/* ALPHA functions */ +unsigned int comedi_get_subdevice_flags(comedi_t *dev,unsigned int + subdevice); +int comedi_get_len_chanlist(comedi_t *dev,unsigned int subdevice); +int comedi_get_krange(comedi_t *dev,unsigned int subdevice,unsigned int + chan, unsigned int range, comedi_krange *krange); +unsigned int comedi_get_buf_head_pos(comedi_t *dev,unsigned int + subdevice); +int comedi_set_user_int_count(comedi_t *dev,unsigned int subdevice, + unsigned int buf_user_count); +int comedi_map(comedi_t *dev, unsigned int subdev, void **ptr); +int comedi_unmap(comedi_t *dev, unsigned int subdev); + + + +#else + /* these functions may not be called at real-time priority */ int comedi_open(unsigned int minor); @@ -111,3 +185,5 @@ int comedi_unmap(unsigned int minor, unsigned int subdev); #endif +#endif +