blob: 0223c9cd9215ba1c9bd0e4825feceffdaa2c8707 [file] [log] [blame]
ankit patelbe932c62018-06-15 13:42:16 -05001/* SPDX-License-Identifier: GPL-2.0+ */
David Schleefed9eccb2008-11-04 20:29:31 -08002/*
Jitendra Kumar Khasdev2acc9802015-11-24 17:52:28 +05303 * comedilib.h
4 * Header file for kcomedilib
5 *
6 * COMEDI - Linux Control and Measurement Device Interface
7 * Copyright (C) 1998-2001 David A. Schleef <ds@schleef.org>
Jitendra Kumar Khasdev2acc9802015-11-24 17:52:28 +05308 */
David Schleefed9eccb2008-11-04 20:29:31 -08009
10#ifndef _LINUX_COMEDILIB_H
11#define _LINUX_COMEDILIB_H
12
Greg Kroah-Hartman472dfe72010-05-03 15:01:50 -070013struct comedi_device *comedi_open(const char *path);
14int comedi_close(struct comedi_device *dev);
Ian Abbott16d2d3c2013-08-23 14:45:07 +010015int comedi_dio_get_config(struct comedi_device *dev, unsigned int subdev,
16 unsigned int chan, unsigned int *io);
Greg Kroah-Hartman472dfe72010-05-03 15:01:50 -070017int comedi_dio_config(struct comedi_device *dev, unsigned int subdev,
18 unsigned int chan, unsigned int io);
Ian Abbott0f3ce1a2013-08-23 14:45:08 +010019int comedi_dio_bitfield2(struct comedi_device *dev, unsigned int subdev,
20 unsigned int mask, unsigned int *bits,
21 unsigned int base_channel);
Greg Kroah-Hartman472dfe72010-05-03 15:01:50 -070022int comedi_find_subdevice_by_type(struct comedi_device *dev, int type,
23 unsigned int subd);
24int comedi_get_n_channels(struct comedi_device *dev, unsigned int subdevice);
Greg Kroah-Hartman027d53bc2010-05-01 13:51:58 -070025
David Schleefed9eccb2008-11-04 20:29:31 -080026#endif