static int do_insn_ioctl(struct comedi_device *dev, void *arg, void *file);
static int do_poll_ioctl(struct comedi_device *dev, unsigned int subd, void *file);
-extern void do_become_nonbusy(struct comedi_device *dev, comedi_subdevice *s);
-static int do_cancel(struct comedi_device *dev, comedi_subdevice *s);
+extern void do_become_nonbusy(struct comedi_device *dev, struct comedi_subdevice *s);
+static int do_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
static int comedi_fasync(int fd, struct file *file, int on);
{
comedi_bufconfig bc;
comedi_async *async;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret = 0;
if (copy_from_user(&bc, arg, sizeof(comedi_bufconfig)))
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
- comedi_subdevice *read_subdev =
+ struct comedi_subdevice *read_subdev =
comedi_get_read_subdevice(dev_file_info);
- comedi_subdevice *write_subdev =
+ struct comedi_subdevice *write_subdev =
comedi_get_write_subdevice(dev_file_info);
memset(&devinfo, 0, sizeof(devinfo));
{
int ret, i;
comedi_subdinfo *tmp, *us;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
tmp = kcalloc(dev->n_subdevices, sizeof(comedi_subdinfo), GFP_KERNEL);
if (!tmp)
*/
static int do_chaninfo_ioctl(struct comedi_device *dev, comedi_chaninfo *arg)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
comedi_chaninfo it;
if (copy_from_user(&it, arg, sizeof(comedi_chaninfo)))
static int do_bufinfo_ioctl(struct comedi_device *dev, void *arg)
{
comedi_bufinfo bi;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
comedi_async *async;
if (copy_from_user(&bi, arg, sizeof(comedi_bufinfo)))
static int parse_insn(struct comedi_device *dev, comedi_insn *insn, unsigned int *data,
void *file)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret = 0;
int i;
static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file)
{
comedi_cmd user_cmd;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
comedi_async *async;
int ret = 0;
unsigned int *chanlist_saver = NULL;
static int do_cmdtest_ioctl(struct comedi_device *dev, void *arg, void *file)
{
comedi_cmd user_cmd;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret = 0;
unsigned int *chanlist = NULL;
unsigned int *chanlist_saver = NULL;
{
int ret = 0;
unsigned long flags;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
if (arg >= dev->n_subdevices)
return -EINVAL;
*/
static int do_unlock_ioctl(struct comedi_device *dev, unsigned int arg, void *file)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
if (arg >= dev->n_subdevices)
return -EINVAL;
*/
static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg, void *file)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
if (arg >= dev->n_subdevices)
return -EINVAL;
*/
static int do_poll_ioctl(struct comedi_device *dev, unsigned int arg, void *file)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
if (arg >= dev->n_subdevices)
return -EINVAL;
return -EINVAL;
}
-static int do_cancel(struct comedi_device *dev, comedi_subdevice *s)
+static int do_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
int ret = 0;
int n_pages;
int i;
int retval;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
mutex_lock(&dev->mutex);
if (!dev->attached) {
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
struct comedi_device *dev = dev_file_info->device;
- comedi_subdevice *read_subdev;
- comedi_subdevice *write_subdev;
+ struct comedi_subdevice *read_subdev;
+ struct comedi_subdevice *write_subdev;
mutex_lock(&dev->mutex);
if (!dev->attached) {
static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes,
loff_t *offset)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
comedi_async *async;
int n, m, count = 0, retval = 0;
DECLARE_WAITQUEUE(wait, current);
static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes,
loff_t *offset)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
comedi_async *async;
int n, m, count = 0, retval = 0;
DECLARE_WAITQUEUE(wait, current);
/*
This function restores a subdevice to an idle state.
*/
-void do_become_nonbusy(struct comedi_device *dev, comedi_subdevice *s)
+void do_become_nonbusy(struct comedi_device *dev, struct comedi_subdevice *s)
{
comedi_async *async = s->async;
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
struct comedi_device *dev = dev_file_info->device;
- comedi_subdevice *s = NULL;
+ struct comedi_subdevice *s = NULL;
int i;
mutex_lock(&dev->mutex);
s);
}
-void comedi_event(struct comedi_device *dev, comedi_subdevice *s)
+void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
{
comedi_async *async = s->async;
unsigned runflags = 0;
s->async->events = 0;
}
-void comedi_set_subdevice_runflags(comedi_subdevice *s, unsigned mask,
+void comedi_set_subdevice_runflags(struct comedi_subdevice *s, unsigned mask,
unsigned bits)
{
unsigned long flags;
comedi_spin_unlock_irqrestore(&s->spin_lock, flags);
}
-unsigned comedi_get_subdevice_runflags(comedi_subdevice *s)
+unsigned comedi_get_subdevice_runflags(struct comedi_subdevice *s)
{
unsigned long flags;
unsigned runflags;
static int is_device_busy(struct comedi_device *dev)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int i;
if (!dev->attached)
}
}
-int comedi_alloc_subdevice_minor(struct comedi_device *dev, comedi_subdevice *s)
+int comedi_alloc_subdevice_minor(struct comedi_device *dev, struct comedi_subdevice *s)
{
unsigned long flags;
struct comedi_device_file_info *info;
return i;
}
-void comedi_free_subdevice_minor(comedi_subdevice *s)
+void comedi_free_subdevice_minor(struct comedi_subdevice *s)
{
unsigned long flags;
struct comedi_device_file_info *info;
#define COMEDI_NUM_BOARD_MINORS 0x30
#define COMEDI_FIRST_SUBDEVICE_MINOR COMEDI_NUM_BOARD_MINORS
-typedef struct comedi_subdevice_struct comedi_subdevice;
typedef struct comedi_async_struct comedi_async;
typedef struct comedi_driver_struct comedi_driver;
typedef struct comedi_lrange_struct comedi_lrange;
#define COMEDI_DEVICE_CREATE(cs, parent, devt, drvdata, device, fmt...) \
device_create(cs, ((parent) ? (parent) : (device)), devt, drvdata, fmt)
-struct comedi_subdevice_struct {
+struct comedi_subdevice {
struct comedi_device *device;
int type;
int n_chan;
unsigned int *chanlist; /* driver-owned chanlist (not used) */
- int (*insn_read) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*insn_read) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
unsigned int *);
- int (*insn_write) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*insn_write) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
unsigned int *);
- int (*insn_bits) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*insn_bits) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
unsigned int *);
- int (*insn_config) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*insn_config) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
unsigned int *);
- int (*do_cmd) (struct comedi_device *, comedi_subdevice *);
- int (*do_cmdtest) (struct comedi_device *, comedi_subdevice *, comedi_cmd *);
- int (*poll) (struct comedi_device *, comedi_subdevice *);
- int (*cancel) (struct comedi_device *, comedi_subdevice *);
- /* int (*do_lock)(struct comedi_device *,comedi_subdevice *); */
- /* int (*do_unlock)(struct comedi_device *,comedi_subdevice *); */
+ int (*do_cmd) (struct comedi_device *, struct comedi_subdevice *);
+ int (*do_cmdtest) (struct comedi_device *, struct comedi_subdevice *, comedi_cmd *);
+ int (*poll) (struct comedi_device *, struct comedi_subdevice *);
+ int (*cancel) (struct comedi_device *, struct comedi_subdevice *);
+ /* int (*do_lock)(struct comedi_device *,struct comedi_subdevice *); */
+ /* int (*do_unlock)(struct comedi_device *,struct comedi_subdevice *); */
/* called when the buffer changes */
- int (*buf_change) (struct comedi_device *dev, comedi_subdevice *s,
+ int (*buf_change) (struct comedi_device *dev, struct comedi_subdevice *s,
unsigned long new_size);
- void (*munge) (struct comedi_device *dev, comedi_subdevice *s, void *data,
+ void (*munge) (struct comedi_device *dev, struct comedi_subdevice *s, void *data,
unsigned int num_bytes, unsigned int start_chan_index);
enum dma_data_direction async_dma_dir;
};
struct comedi_async_struct {
- comedi_subdevice *subdevice;
+ struct comedi_subdevice *subdevice;
void *prealloc_buf; /* pre-allocated buffer */
unsigned int prealloc_bufsz; /* buffer size, in bytes */
int (*cb_func) (unsigned int flags, void *);
void *cb_arg;
- int (*inttrig) (struct comedi_device *dev, comedi_subdevice *s,
+ int (*inttrig) (struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int x);
};
int in_request_module;
int n_subdevices;
- comedi_subdevice *subdevices;
+ struct comedi_subdevice *subdevices;
/* dumb */
unsigned long iobase;
unsigned int irq;
- comedi_subdevice *read_subdev;
- comedi_subdevice *write_subdev;
+ struct comedi_subdevice *read_subdev;
+ struct comedi_subdevice *write_subdev;
struct fasync_struct *async_queue;
struct comedi_device_file_info {
struct comedi_device *device;
- comedi_subdevice *read_subdevice;
- comedi_subdevice *write_subdevice;
+ struct comedi_subdevice *read_subdevice;
+ struct comedi_subdevice *write_subdevice;
};
#ifdef CONFIG_COMEDI_DEBUG
* function prototypes
*/
-void comedi_event(struct comedi_device *dev, comedi_subdevice *s);
+void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s);
void comedi_error(const struct comedi_device *dev, const char *s);
/* we can expand the number of bits used to encode devices/subdevices into
struct comedi_device_file_info *comedi_get_device_file_info(unsigned minor);
-static inline comedi_subdevice *comedi_get_read_subdevice(
+static inline struct comedi_subdevice *comedi_get_read_subdevice(
const struct comedi_device_file_info *info)
{
if (info->read_subdevice)
return info->device->read_subdev;
}
-static inline comedi_subdevice *comedi_get_write_subdevice(
+static inline struct comedi_subdevice *comedi_get_write_subdevice(
const struct comedi_device_file_info *info)
{
if (info->write_subdevice)
void start_polling(struct comedi_device *);
void stop_polling(struct comedi_device *);
-int comedi_buf_alloc(struct comedi_device *dev, comedi_subdevice *s, unsigned long
+int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s, unsigned long
new_size);
#ifdef CONFIG_PROC_FS
*/
int do_rangeinfo_ioctl(struct comedi_device *dev, comedi_rangeinfo *arg);
-int check_chanlist(comedi_subdevice *s, int n, unsigned int *chanlist);
-void comedi_set_subdevice_runflags(comedi_subdevice *s, unsigned mask,
+int check_chanlist(struct comedi_subdevice *s, int n, unsigned int *chanlist);
+void comedi_set_subdevice_runflags(struct comedi_subdevice *s, unsigned mask,
unsigned bits);
-unsigned comedi_get_subdevice_runflags(comedi_subdevice *s);
-int insn_inval(struct comedi_device *dev, comedi_subdevice *s,
+unsigned comedi_get_subdevice_runflags(struct comedi_subdevice *s);
+int insn_inval(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/* range stuff */
dev->n_subdevices = num_subdevices;
dev->subdevices =
- kcalloc(num_subdevices, sizeof(comedi_subdevice), GFP_KERNEL);
+ kcalloc(num_subdevices, sizeof(struct comedi_subdevice), GFP_KERNEL);
if (!dev->subdevices)
return -ENOMEM;
for (i = 0; i < num_subdevices; ++i) {
return 0;
}
-static inline unsigned int bytes_per_sample(const comedi_subdevice *subd)
+static inline unsigned int bytes_per_sample(const struct comedi_subdevice *subd)
{
if (subd->subdev_flags & SDF_LSAMPL)
return sizeof(unsigned int);
int comedi_alloc_board_minor(struct device *hardware_device);
void comedi_free_board_minor(unsigned minor);
-int comedi_alloc_subdevice_minor(struct comedi_device *dev, comedi_subdevice *s);
-void comedi_free_subdevice_minor(comedi_subdevice *s);
+int comedi_alloc_subdevice_minor(struct comedi_device *dev, struct comedi_subdevice *s);
+void comedi_free_subdevice_minor(struct comedi_subdevice *s);
int comedi_pci_auto_config(struct pci_dev *pcidev, const char *board_name);
void comedi_pci_auto_unconfig(struct pci_dev *pcidev);
struct usb_device; /* forward declaration */
#include <asm/system.h>
static int postconfig(struct comedi_device *dev);
-static int insn_rw_emulate_bits(struct comedi_device *dev, comedi_subdevice *s,
+static int insn_rw_emulate_bits(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
static void *comedi_recognize(comedi_driver * driv, const char *name);
static void comedi_report_boards(comedi_driver *driv);
-static int poll_invalid(struct comedi_device *dev, comedi_subdevice *s);
-int comedi_buf_alloc(struct comedi_device *dev, comedi_subdevice *s,
+static int poll_invalid(struct comedi_device *dev, struct comedi_subdevice *s);
+int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned long new_size);
comedi_driver *comedi_drivers;
static void cleanup_device(struct comedi_device *dev)
{
int i;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
if (dev->subdevices) {
for (i = 0; i < dev->n_subdevices; i++) {
static int postconfig(struct comedi_device *dev)
{
int i;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
comedi_async *async = NULL;
int ret;
printk(" %s\n", driv->driver_name);
}
-static int poll_invalid(struct comedi_device *dev, comedi_subdevice *s)
+static int poll_invalid(struct comedi_device *dev, struct comedi_subdevice *s)
{
return -EINVAL;
}
-int insn_inval(struct comedi_device *dev, comedi_subdevice *s,
+int insn_inval(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
return -EINVAL;
}
-static int insn_rw_emulate_bits(struct comedi_device *dev, comedi_subdevice *s,
+static int insn_rw_emulate_bits(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
comedi_insn new_insn;
return kva;
}
-int comedi_buf_alloc(struct comedi_device *dev, comedi_subdevice *s,
+int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned long new_size)
{
comedi_async *async = s->async;
* and kernel space */
unsigned int comedi_buf_munge(comedi_async *async, unsigned int num_bytes)
{
- comedi_subdevice *s = async->subdevice;
+ struct comedi_subdevice *s = async->subdevice;
unsigned int count = 0;
const unsigned num_sample_bytes = bytes_per_sample(s);
COMEDI_INITCLEANUP(driver_8255);
-static void do_config(struct comedi_device *dev, comedi_subdevice * s);
+static void do_config(struct comedi_device *dev, struct comedi_subdevice * s);
-void subdev_8255_interrupt(struct comedi_device *dev, comedi_subdevice * s)
+void subdev_8255_interrupt(struct comedi_device *dev, struct comedi_subdevice * s)
{
short d;
}
}
-static int subdev_8255_insn(struct comedi_device *dev, comedi_subdevice * s,
+static int subdev_8255_insn(struct comedi_device *dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
return 2;
}
-static int subdev_8255_insn_config(struct comedi_device *dev, comedi_subdevice * s,
+static int subdev_8255_insn_config(struct comedi_device *dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int mask;
return 1;
}
-static void do_config(struct comedi_device *dev, comedi_subdevice * s)
+static void do_config(struct comedi_device *dev, struct comedi_subdevice * s)
{
int config;
CALLBACK_FUNC(1, _8255_CR, config, CALLBACK_ARG);
}
-static int subdev_8255_cmdtest(struct comedi_device *dev, comedi_subdevice * s,
+static int subdev_8255_cmdtest(struct comedi_device *dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int subdev_8255_cmd(struct comedi_device *dev, comedi_subdevice * s)
+static int subdev_8255_cmd(struct comedi_device *dev, struct comedi_subdevice * s)
{
/* FIXME */
return 0;
}
-static int subdev_8255_cancel(struct comedi_device *dev, comedi_subdevice * s)
+static int subdev_8255_cancel(struct comedi_device *dev, struct comedi_subdevice * s)
{
/* FIXME */
return 0;
}
-int subdev_8255_init(struct comedi_device *dev, comedi_subdevice * s, int (*cb) (int,
+int subdev_8255_init(struct comedi_device *dev, struct comedi_subdevice * s, int (*cb) (int,
int, int, unsigned long), unsigned long arg)
{
s->type = COMEDI_SUBD_DIO;
return 0;
}
-int subdev_8255_init_irq(struct comedi_device *dev, comedi_subdevice * s,
+int subdev_8255_init_irq(struct comedi_device *dev, struct comedi_subdevice * s,
int (*cb) (int, int, int, unsigned long), unsigned long arg)
{
int ret;
return 0;
}
-void subdev_8255_cleanup(struct comedi_device *dev, comedi_subdevice * s)
+void subdev_8255_cleanup(struct comedi_device *dev, struct comedi_subdevice * s)
{
if (s->private) {
if (subdevpriv->have_irq) {
{
int i;
unsigned long iobase;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
printk("comedi%d: 8255: remove\n", dev->minor);
#if defined(CONFIG_COMEDI_8255) || defined(CONFIG_COMEDI_8255_MODULE)
-int subdev_8255_init(struct comedi_device * dev, comedi_subdevice * s,
+int subdev_8255_init(struct comedi_device * dev, struct comedi_subdevice * s,
int (*cb) (int, int, int, unsigned long), unsigned long arg);
-int subdev_8255_init_irq(struct comedi_device * dev, comedi_subdevice * s,
+int subdev_8255_init_irq(struct comedi_device * dev, struct comedi_subdevice * s,
int (*cb) (int, int, int, unsigned long), unsigned long arg);
-void subdev_8255_cleanup(struct comedi_device * dev, comedi_subdevice * s);
-void subdev_8255_interrupt(struct comedi_device * dev, comedi_subdevice * s);
+void subdev_8255_cleanup(struct comedi_device * dev, struct comedi_subdevice * s);
+void subdev_8255_interrupt(struct comedi_device * dev, struct comedi_subdevice * s);
#else
-static inline int subdev_8255_init(struct comedi_device * dev, comedi_subdevice * s,
+static inline int subdev_8255_init(struct comedi_device * dev, struct comedi_subdevice * s,
void *x, unsigned long y)
{
printk("8255 support not configured -- disabling subdevice\n");
}
static inline void subdev_8255_cleanup(struct comedi_device * dev,
- comedi_subdevice * s)
+ struct comedi_subdevice * s)
{
}
COMEDI_INITCLEANUP(driver_acl7225b);
-static int acl7225b_do_insn(struct comedi_device *dev, comedi_subdevice * s,
+static int acl7225b_do_insn(struct comedi_device *dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int acl7225b_di_insn(struct comedi_device *dev, comedi_subdevice * s,
+static int acl7225b_di_insn(struct comedi_device *dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
static int acl7225b_attach(struct comedi_device *dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int iobase, iorange;
iobase = it->options[0];
| BYTE_ b_InputClockLevel, |
| BYTE_ b_OutputLevel, |
| BYTE_ b_HardwareGateLevel)
-INT i_InsnConfig_InitTimer(struct comedi_device *dev,comedi_subdevice *s,
+INT i_InsnConfig_InitTimer(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data)
|
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigInitTimer(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigInitTimer(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
| BYTE_ b_ModulNbr, |
| BYTE_ b_TimerNbr, |
| BYTE_ b_InterruptEnable)
-INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,comedi_subdevice *s,
+INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Enable OR Disable the Timer (b_TimerNbr) from selected module |
*/
INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device * dev,
- comedi_subdevice * s,
+ struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
| (BYTE_ b_BoardHandle, |
| BYTE_ b_ModulNbr, |
| PULONG_ pul_TimerValueArray)
-INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev,comedi_subdevice *s,
+INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the all timer values from selected timer |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
INT i_ReturnValue = 0;
/*
+----------------------------------------------------------------------------+
| Function Name :INT i_APCI1710_InsnBitsTimer(struct comedi_device *dev,
-comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read write functions for Timer |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnBitsTimer(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
BYTE b_BitsType;
/*
* 82X54 TIMER INISIALISATION FUNCTION
*/
-INT i_APCI1710_InsnConfigInitTimer(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigInitTimer(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
* 82X54 READ FUNCTION
*/
-INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnBitsTimer(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
| BYTE_ b_CycleMode, |
| BYTE_ b_InterruptEnable)
INT i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device *dev,
-comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Enable the chronometer from selected module |
| (b_ModulNbr). You must calling the |
*/
INT i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
BYTE b_ModulNbr, b_CycleMode, b_InterruptEnable, b_Action;
/*
+----------------------------------------------------------------------------+
-| Function Name :INT i_APCI1710_InsnReadChrono(struct comedi_device *dev,comedi_subdevice *s,
+| Function Name :INT i_APCI1710_InsnReadChrono(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read functions for Timer |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnReadChrono(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnReadChrono(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
BYTE b_ReadType;
/*
+----------------------------------------------------------------------------+
-| Function Name : INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device *dev,comedi_subdevice *s,
+| Function Name : INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Sets the output witch has been passed with the |
*/
INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
BYTE b_ModulNbr, b_OutputChannel, b_InputChannel, b_IOType;
/*
* CHRONOMETER INISIALISATION FUNCTION
*/
-INT i_APCI1710_InsnConfigInitChrono(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigInitChrono(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
/*
* CHRONOMETER READ FUNCTION
*/
-INT i_APCI1710_InsnReadChrono(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnReadChrono(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI1710_GetChronoProgressStatus(struct comedi_device *dev,
* CHRONOMETER DIGITAL INPUT OUTPUT FUNCTION
*/
INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device *dev, |
-| comedi_subdevice *s,comedi_insn *insn,unsigned int *data)|
+| struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data)|
+----------------------------------------------------------------------------+
| Task : Configure the digital I/O operating mode from selected |
| module (b_ModulNbr). You must calling this function be|
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
BYTE b_ModulNbr, b_ChannelAMode, b_ChannelBMode;
//
// PBYTE_ pb_ChannelStatus)
INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_StatusReg;
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI1710_InsnWriteDigitalIOChlOnOff(comedi_device
-|*dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data)
+|*dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data)
+----------------------------------------------------------------------------+
| Task : Sets or resets the output witch has been passed with the |
// BYTE_ b_ModulNbr,
// BYTE_ b_OutputChannel)
INT i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_WriteValue = 0;
// BYTE_ b_ModulNbr,
// BYTE_ b_PortValue)
INT i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_WriteValue = 0;
/*
* DIGITAL I/O INISIALISATION FUNCTION
*/
-INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
* INPUT OUTPUT FUNCTIONS
*/
INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
+----------------------------------------------------------------------------+
-| INT i_APCI1710_InsnConfigINCCPT(struct comedi_device *dev,comedi_subdevice *s,
+| INT i_APCI1710_InsnConfigINCCPT(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data)
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_ConfigType;
/*
+----------------------------------------------------------------------------+
-| Function Name :INT i_APCI1710_InsnBitsINCCPT(struct comedi_device *dev,comedi_subdevice *s,
+| Function Name :INT i_APCI1710_InsnBitsINCCPT(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Set & Clear Functions for INC_CPT |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnBitsINCCPT(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnBitsINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_BitsType;
/*
+----------------------------------------------------------------------------+
-| Function Name :INT i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev,comedi_subdevice *s,
+| Function Name :INT i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Enable Disable functions for INC_CPT |
| Return Value :
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnWriteINCCPT(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnWriteINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_WriteType;
/*
+----------------------------------------------------------------------------+
-| Function Name :INT i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev,comedi_subdevice *s,
+| Function Name :INT i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read and Get functions for INC_CPT |
| Return Value :
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_ReadType;
#define APCI1710_INCCPT_DISABLEFREQUENCYMEASUREMENT 409
/************ Main Functions *************/
-INT i_APCI1710_InsnConfigINCCPT(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigINCCPT(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int * data);
-INT i_APCI1710_InsnBitsINCCPT(struct comedi_device *dev, comedi_subdevice * s,
+INT i_APCI1710_InsnBitsINCCPT(struct comedi_device *dev, struct comedi_subdevice * s,
comedi_insn *insn, unsigned int * data);
-INT i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev, comedi_subdevice * s,
+INT i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev, struct comedi_subdevice * s,
comedi_insn *insn, unsigned int * data);
-INT i_APCI1710_InsnReadINCCPT(struct comedi_device *dev, comedi_subdevice * s,
+INT i_APCI1710_InsnReadINCCPT(struct comedi_device *dev, struct comedi_subdevice * s,
comedi_insn *insn, unsigned int * data);
/*********** Supplementary Functions********/
*/
INT i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_IntRegister;
*/
INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
BYTE b_ModulNbr;
PBYTE_ pb_Status)
*/
INT i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_StatusRegister;
}
INT i_APCI1710_InsnReadInterruptPulseEncoder(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->s_InterruptParameters.
#define APCI1710_PULSEENCODER_WRITE 1
INT i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
* READ PULSE ENCODER FUNCTIONS
*/
INT i_APCI1710_InsnReadInterruptPulseEncoder(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
* WRITE PULSE ENCODER FUNCTIONS
*/
INT i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
/*
+----------------------------------------------------------------------------+
| Function Name :INT i_APCI1710_InsnConfigPWM(struct comedi_device *dev,
-comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Pwm Init and Get Pwm Initialisation |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigPWM(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
BYTE b_ConfigType;
/*
+----------------------------------------------------------------------------+
| Function Name :INT i_APCI1710_InsnWritePWM(struct comedi_device *dev,
-comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Pwm Enable Disable and Set New Timing |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnWritePWM(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnWritePWM(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
BYTE b_WriteType;
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
}
INT i_APCI1710_InsnBitsReadPWMInterrupt(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->s_InterruptParameters.
s_FIFOInterruptParameters[devpriv->
#define APCI1710_PWM_ENABLE 1
#define APCI1710_PWM_NEWTIMING 2
-INT i_APCI1710_InsnConfigPWM(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigPWM(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InitPWM(struct comedi_device *dev,
PBYTE pb_ExternGate,
PBYTE pb_InterruptEnable, PBYTE pb_Enable);
-INT i_APCI1710_InsnWritePWM(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnWritePWM(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI1710_EnablePWM(struct comedi_device *dev,
INT i_APCI1710_DisablePWM(struct comedi_device *dev, BYTE b_ModulNbr, BYTE b_PWM);
-INT i_APCI1710_InsnReadGetPWMStatus(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnReadGetPWMStatus(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnBitsReadPWMInterrupt(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
| BYTE_ b_SelectedSSI, |
| PULONG_ pul_Position, |
| PULONG_ pul_TurnCpt)
- INT i_APCI1710_ReadSSIValue(struct comedi_device *dev,comedi_subdevice *s,
+ INT i_APCI1710_ReadSSIValue(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task :
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
/*
* SSI INISIALISATION FUNCTION
*/
-INT i_APCI1710_InsnConfigInitSSI(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigInitSSI(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnReadSSIValue(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnReadSSIValue(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
*/
INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
ULONG ul_TimerValue = 0;
*/
INT i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_Status;
*/
INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_Status;
*/
INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_Status;
* TOR_COUNTER INISIALISATION FUNCTION
*/
INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
/*
* TOR_COUNTER READ FUNCTION
*/
INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigInitTTLIO(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigInitTTLIO(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI1710_InsnReadTTLIOAllPortValue(comedi_device
-*dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+*dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read the status from all digital input ports |
| (port A, port B and port C) from selected TTL |
*/
INT i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_StatusReg;
| (BYTE_ b_BoardHandle, |
| BYTE_ b_ModulNbr, |
| BYTE_ b_OutputChannel)
-INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,comedi_subdevice *s,
+INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Sets or resets the output witch has been passed with the |
*/
INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_StatusReg = 0;
/*
* TTL INISIALISATION FUNCTION
*/
-INT i_APCI1710_InsnConfigInitTTLIO(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigInitTTLIO(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
* TTL INPUT FUNCTION
*/
-INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
* TTL OUTPUT FUNCTIONS
*/
INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
static int i_ADDI_Attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret, pages, i, n_subdevices;
DWORD dw_Dummy;
resource_size_t io_addr[5];
/*
+----------------------------------------------------------------------------+
| Function name : |
-|INT i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev,comedi_subdevice *s,
+|INT i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data)
| |
+----------------------------------------------------------------------------+
| Task : Read 256 words from EEPROM |
| |
+----------------------------------------------------------------------------+
-| Input Parameters :(struct comedi_device *dev,comedi_subdevice *s,
+| Input Parameters :(struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
| |
| |
+----------------------------------------------------------------------------+
*/
-static int i_ADDIDATA_InsnReadEeprom(struct comedi_device * dev, comedi_subdevice * s,
+static int i_ADDIDATA_InsnReadEeprom(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
WORD w_Data;
/* ANALOG INPUT */
int (*i_hwdrv_InsnConfigAnalogInput)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnReadAnalogInput)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnWriteAnalogInput)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnBitsAnalogInput)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_CommandTestAnalogInput)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_cmd *cmd);
int (*i_hwdrv_CommandAnalogInput)(struct comedi_device *dev,
- comedi_subdevice *s);
+ struct comedi_subdevice *s);
int (*i_hwdrv_CancelAnalogInput)(struct comedi_device *dev,
- comedi_subdevice *s);
+ struct comedi_subdevice *s);
/* Analog Output */
int (*i_hwdrv_InsnConfigAnalogOutput)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnWriteAnalogOutput)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnBitsAnalogOutput)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
/* Digital Input */
int (*i_hwdrv_InsnConfigDigitalInput) (struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnReadDigitalInput) (struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnWriteDigitalInput) (struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnBitsDigitalInput) (struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
/* Digital Output */
int (*i_hwdrv_InsnConfigDigitalOutput)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnWriteDigitalOutput)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnBitsDigitalOutput)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnReadDigitalOutput)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
/* TIMER */
int (*i_hwdrv_InsnConfigTimer)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
int (*i_hwdrv_InsnWriteTimer)(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnReadTimer)(struct comedi_device *dev, comedi_subdevice *s,
+ int (*i_hwdrv_InsnReadTimer)(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
- int (*i_hwdrv_InsnBitsTimer)(struct comedi_device *dev, comedi_subdevice *s,
+ int (*i_hwdrv_InsnBitsTimer)(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/* TTL IO */
int (*i_hwdr_ConfigInitTTLIO)(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
- int (*i_hwdr_ReadTTLIOBits)(struct comedi_device *dev, comedi_subdevice *s,
+ int (*i_hwdr_ReadTTLIOBits)(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
int (*i_hwdr_ReadTTLIOAllPortValue)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int (*i_hwdr_WriteTTLIOChlOnOff)(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
} boardtype;
static int i_ADDI_Reset(struct comedi_device *dev);
static irqreturn_t v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG);
-static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev, comedi_subdevice *s,
+static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
void i_ADDI_AttachPCI1710(struct comedi_device * dev)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret = 0;
int n_subdevices = 9;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI035_ConfigTimerWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Timer , Counter or Watchdog |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI035_ConfigTimerWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI035_ConfigTimerWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Status = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI035_StartStopWriteTimerWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Selected Timer , or Watchdog |
+----------------------------------------------------------------------------+
*/
INT i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
UINT ui_Command = 0;
INT i_Count = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI035_ReadTimerWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Selected Timer , Counter or Watchdog |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI035_ReadTimerWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI035_ReadTimerWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Status = 0; // Status register
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI035_ConfigAnalogInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Analog Input Subdevice |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s : Subdevice Pointer |
+| struct comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI035_ConfigAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI035_ConfigAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
devpriv->tsk_Current = current;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI035_ReadAnalogInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI035_ReadAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI035_ReadAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_CommandRegister = 0;
/* TIMER */
/* timer value is passed as u seconds */
-INT i_APCI035_ConfigTimerWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI035_ConfigTimerWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI035_ReadTimerWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI035_ReadTimerWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/* Temperature Related Defines (Analog Input Subdevice) */
-INT i_APCI035_ConfigAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI035_ConfigAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI035_ReadAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI035_ReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/* Interrupt */
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1032_ConfigDigitalInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures the digital input Subdevice |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1032_ConfigDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1032_ConfigDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1032_Read1DigitalInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1032_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1032_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1032_ReadMoreDigitalInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1032_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1032_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_PortValue = data[0];
//DI
// for di read
-INT i_APCI1032_ConfigDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1032_ConfigDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1032_Read1DigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1032_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1032_ReadMoreDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1032_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// Interrupt functions.....
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ConfigDigitalInputEvent |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : An event can be generated for each port. |
*/
INT i_APCI1500_ConfigDigitalInputEvent(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i_PatternPolarity = 0, i_PatternTransition = 0, i_PatternMask = 0;
int i_MaxChannel = 0, i_Count = 0, i_EventMask = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_StartStopInputEvent |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Allows or disallows a port event |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI1500_StartStopInputEvent(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI1500_StartStopInputEvent(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i_Event1InterruptStatus = 0, i_Event2InterruptStatus =
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_Initialisation |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1500_Initialisation(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1500_Initialisation(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i_DummyRead = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ReadMoreDigitalInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1500_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1500_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_PortValue = data[1];
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ConfigDigitalOutputErrorInterrupt
- (struct comedi_device *dev,comedi_subdevice *s comedi_insn
+ (struct comedi_device *dev,struct comedi_subdevice *s comedi_insn
*insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| data[0] :1:Memory on |
| 0:Memory off |
+----------------------------------------------------------------------------+
*/
int i_APCI1500_ConfigDigitalOutputErrorInterrupt(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
devpriv->b_OutputMemoryStatus = data[0];
return insn->n;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_WriteDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1500_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1500_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
static UINT ui_Temp = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ConfigCounterTimerWatchdog(comedi_device
- *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data)|
+ *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data)|
| |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status data[0] : 2 APCI1500_1_8_KHZ
| 1 APCI1500_3_6_KHZ |
*/
int i_APCI1500_ConfigCounterTimerWatchdog(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i_TimerCounterMode, i_MasterConfiguration;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_StartStopTriggerTimerCounterWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s,
+| (struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Start / Stop or trigger the timer counter or Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
data[0] : 0 Counter1/Timer1
+----------------------------------------------------------------------------+
*/
int i_APCI1500_StartStopTriggerTimerCounterWatchdog(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i_CommandAndStatusValue;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ReadCounterTimerWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
data[0] : 0 Counter1/Timer1
*/
int i_APCI1500_ReadCounterTimerWatchdog(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i_CommandAndStatusValue;
switch (data[0]) {
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ReadInterruptMask |
-| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read the interrupt mask |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI1500_ReadInterruptMask(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI1500_ReadInterruptMask(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = i_InterruptMask;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ConfigureInterrupt |
-| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Configures the interrupt registers |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI1500_ConfigureInterrupt(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI1500_ConfigureInterrupt(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Status;
};
/*----------DIGITAL INPUT----------------*/
-static int i_APCI1500_Initialisation(struct comedi_device *dev, comedi_subdevice *s,
+static int i_APCI1500_Initialisation(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
static int i_APCI1500_ConfigDigitalInputEvent(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
static int i_APCI1500_StartStopInputEvent(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
static int i_APCI1500_ReadMoreDigitalInput(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*---------- DIGITAL OUTPUT------------*/
static int i_APCI1500_ConfigDigitalOutputErrorInterrupt(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
static int i_APCI1500_WriteDigitalOutput(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*----------TIMER----------------*/
static int i_APCI1500_ConfigCounterTimerWatchdog(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
static int i_APCI1500_StartStopTriggerTimerCounterWatchdog(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
static int i_APCI1500_ReadCounterTimerWatchdog(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
static int i_APCI1500_ReadInterruptMask(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*----------INTERRUPT HANDLER------*/
static void v_APCI1500_Interrupt(int irq, void *d);
static int i_APCI1500_ConfigureInterrupt(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*----------RESET---------------*/
static int i_APCI1500_Reset(struct comedi_device *dev);
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_Read1DigitalInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1516_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1516_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ReadMoreDigitalInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-INT i_APCI1516_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1516_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ConfigDigitalOutput (struct comedi_device *dev,
- comedi_subdevice *s comedi_insn *insn,unsigned int *data) |
+ struct comedi_subdevice *s comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
| Input Parameters : struct comedi_device *dev : Driver handle |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| data[0] :1:Memory on |
| 0:Memory off |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI1516_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI1516_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
devpriv->b_OutputMemoryStatus = data[0];
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_WriteDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-INT i_APCI1516_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1516_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ReadDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-INT i_APCI1516_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1516_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ConfigWatchdog(struct comedi_device *dev,
- comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+ struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI1516_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI1516_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0] == 0) {
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_StartStopWriteWatchdog |
- | (struct comedi_device *dev,comedi_subdevice *s,
+ | (struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | comedi_subdevice *s, :pointer to subdevice structure
+ | struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI1516_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI1516_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ReadWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI1516_ReadWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI1516_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = inw(devpriv->i_IobaseAddon + APCI1516_WATCHDOG_STATUS) & 0x1;
// Hardware Layer functions for Apci1516
//Digital Input
-INT i_APCI1516_ReadMoreDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1516_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1516_Read1DigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1516_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//Digital Output
-int i_APCI1516_ConfigDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI1516_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1516_WriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1516_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1516_ReadDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1516_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
-int i_APCI1516_ConfigWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI1516_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI1516_StartStopWriteWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI1516_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI1516_ReadWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI1516_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//reset
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ConfigDigitalInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures the digital input Subdevice |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ConfigDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1564_ConfigDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
devpriv->tsk_Current = current;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_Read1DigitalInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1564_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadMoreDigitalInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1564_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_PortValue = data[0];
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ConfigDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1564_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_WriteDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1564_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1564_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ConfigTimerCounterWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
*/
INT i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
devpriv->tsk_Current = current;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_StartStopWriteTimerCounterWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
*/
INT i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadTimerCounterWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
*/
INT i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadInterruptStatus |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task :Reads the interrupt status register |
+----------------------------------------------------------------------------+
*/
-int i_APCI1564_ReadInterruptStatus(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI1564_ReadInterruptStatus(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
*data = ui_Type;
//DI
// for di read
-INT i_APCI1564_ConfigDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1564_ConfigDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1564_Read1DigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1564_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1564_ReadMoreDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1564_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//DO
-int i_APCI1564_ConfigDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI1564_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1564_WriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1564_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1564_ReadDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1564_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI1564_ReadInterruptStatus(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI1564_ReadInterruptStatus(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
INT i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
int i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// INTERRUPT
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI16XX_InsnConfigInitTTLIO |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Command = 0;
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI16XX_InsnBitsReadTTLIO |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Command = 0;
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI16XX_InsnReadTTLIOAllPortValue |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
BYTE b_Command = (BYTE) CR_AREF(insn->chanspec);
INT i_ReturnValue = insn->n;
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI16XX_InsnBitsWriteTTLIO |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Command = 0;
*/
int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
/*
*/
int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
*/
int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
int i_APCI16XX_Reset(struct comedi_device *dev);
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_ConfigDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2016_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2016_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if ((data[0] != 0) && (data[0] != 1)) {
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_WriteDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2016_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2016_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_NoOfChannel;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_BitsDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2016_BitsDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2016_BitsDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_ConfigWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure |
+| struct comedi_subdevice *s, :pointer to subdevice structure |
| comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2016_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2016_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_StartStopWriteWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure |
+| struct comedi_subdevice *s, :pointer to subdevice structure |
| comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2016_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2016_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_ReadWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure |
+| struct comedi_subdevice *s, :pointer to subdevice structure |
| comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI2016_ReadWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2016_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
udelay(5);
// Hardware Layer functions for Apci2016
//DO
-int i_APCI2016_ConfigDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2016_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2016_WriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2016_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2016_BitsDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2016_BitsDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
-int i_APCI2016_ConfigWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2016_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2016_StartStopWriteWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2016_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2016_ReadWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2016_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// Interrupt functions.....
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ConfigDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2032_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2032_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_WriteDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
*/
-INT i_APCI2032_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2032_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ReadDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
*/
-INT i_APCI2032_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2032_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI2032_ConfigWatchdog(comedi_device
- *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data)|
+ *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data)|
| |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI2032_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2032_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0] == 0) {
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_StartStopWriteWatchdog |
- | (struct comedi_device *dev,comedi_subdevice *s,
+ | (struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | comedi_subdevice *s, :pointer to subdevice structure
+ | struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI2032_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2032_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ReadWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI2032_ReadWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2032_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ReadInterruptStatus |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task :Reads the interrupt status register |
+----------------------------------------------------------------------------+
*/
-int i_APCI2032_ReadInterruptStatus(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2032_ReadInterruptStatus(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
*data = ui_Type;
// Hardware Layer functions for Apci2032
//DO
-int i_APCI2032_ConfigDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2032_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI2032_WriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2032_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI2032_ReadDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2032_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2032_ReadInterruptStatus(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2032_ReadInterruptStatus(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
-INT i_APCI2032_ConfigWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2032_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2032_StartStopWriteWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2032_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2032_ReadWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2032_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// Interrupt functions.....
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_Read1DigitalInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI2200_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2200_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ReadMoreDigitalInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-INT i_APCI2200_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2200_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ConfigDigitalOutput (struct comedi_device *dev,
- comedi_subdevice *s comedi_insn *insn,unsigned int *data) |
+ struct comedi_subdevice *s comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
| Input Parameters : struct comedi_device *dev : Driver handle |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| data[0] :1:Memory on |
| 0:Memory off |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2200_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2200_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
devpriv->b_OutputMemoryStatus = data[0];
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_WriteDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-INT i_APCI2200_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2200_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ReadDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-INT i_APCI2200_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2200_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ConfigWatchdog(struct comedi_device *dev,
- comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+ struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI2200_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2200_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0] == 0) {
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_StartStopWriteWatchdog |
- | (struct comedi_device *dev,comedi_subdevice *s,
+ | (struct comedi_device *dev,struct comedi_subdevice *s,
comedi_insn *insn,unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | comedi_subdevice *s, :pointer to subdevice structure
+ | struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI2200_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2200_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ReadWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s, :pointer to subdevice structure
+| struct comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI2200_ReadWatchdog(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI2200_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] =
// Hardware Layer functions for Apci2200
//Digital Input
-INT i_APCI2200_ReadMoreDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2200_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI2200_Read1DigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2200_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//Digital Output
-int i_APCI2200_ConfigDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2200_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI2200_WriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2200_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI2200_ReadDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2200_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// TIMER
-int i_APCI2200_ConfigWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2200_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2200_StartStopWriteWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2200_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2200_ReadWatchdog(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI2200_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//reset
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev,|
-| comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+| struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Calls card specific function |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnConfigAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_InsnConfigAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT i;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, |
-| comedi_subdevice *s,comedi_insn *insn, unsigned int *data) |
+| struct comedi_subdevice *s,comedi_insn *insn, unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : card specific function |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnReadAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_InsnReadAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
USHORT us_ConvertTiming, us_TmpValue, i;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev,|
-| comedi_subdevice *s)|
+| struct comedi_subdevice *s)|
| |
+----------------------------------------------------------------------------+
| Task : Stops Cyclic acquisition |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| |
+----------------------------------------------------------------------------+
| Return Value :0 |
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_StopCyclicAcquisition(struct comedi_device * dev, comedi_subdevice * s)
+int i_APCI3120_StopCyclicAcquisition(struct comedi_device * dev, struct comedi_subdevice * s)
{
// Disable A2P Fifo write and AMWEN signal
outw(0, devpriv->i_IobaseAddon + 4);
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev|
-| ,comedi_subdevice *s,comedi_cmd *cmd) |
+| ,struct comedi_subdevice *s,comedi_cmd *cmd) |
| |
+----------------------------------------------------------------------------+
| Task : Test validity for a command for cyclic anlog input |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| comedi_cmd *cmd |
+----------------------------------------------------------------------------+
| Return Value :0 |
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_CommandTestAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
/*
+----------------------------------------------------------------------------+
| Function name : int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, |
-| comedi_subdevice *s) |
+| struct comedi_subdevice *s) |
| |
+----------------------------------------------------------------------------+
| Task : Does asynchronous acquisition |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| |
+----------------------------------------------------------------------------+
| Return Value : |
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_CommandAnalogInput(struct comedi_device * dev, comedi_subdevice * s)
+int i_APCI3120_CommandAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
/*
+----------------------------------------------------------------------------+
| Function name : int i_APCI3120_CyclicAnalogInput(int mode, |
-| struct comedi_device * dev,comedi_subdevice * s) |
+| struct comedi_device * dev,struct comedi_subdevice * s) |
+----------------------------------------------------------------------------+
| Task : This is used for analog input cyclic acquisition |
| Performs the command operations. |
*/
int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device * dev,
- comedi_subdevice * s)
+ struct comedi_subdevice * s)
{
BYTE b_Tmp;
UINT ui_Tmp, ui_DelayTiming = 0, ui_TimerValue1 = 0, dmalen0 =
/*
+----------------------------------------------------------------------------+
| Function name : int i_APCI3120_SetupChannelList(struct comedi_device * dev, |
-| comedi_subdevice * s, int n_chan,unsigned int *chanlist|
+| struct comedi_subdevice * s, int n_chan,unsigned int *chanlist|
| ,char check) |
| |
+----------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device * dev |
-| comedi_subdevice * s |
+| struct comedi_subdevice * s |
| int n_chan |
unsigned int *chanlist
char check
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_SetupChannelList(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_SetupChannelList(struct comedi_device * dev, struct comedi_subdevice * s,
int n_chan, unsigned int *chanlist, char check)
{
unsigned int i; //, differencial=0, bipolar=0;
USHORT us_TmpValue;
BYTE b_DummyRead;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
ui_Check = 1;
int_daq = inw(dev->iobase + APCI3120_RD_STATUS) & 0xf000; // get IRQ reasons
{
int n_chan,i;
short *data;
- comedi_subdevice *s=dev->subdevices+0;
+ struct comedi_subdevice *s=dev->subdevices+0;
comedi_async *async = s->async;
data=async->data+async->buf_int_ptr;//new samples added from here onwards
n_chan=devpriv->ui_AiNbrofChannels;
int i_APCI3120_InterruptHandleEos(struct comedi_device * dev)
{
int n_chan, i;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
int err = 1;
n_chan = devpriv->ui_AiNbrofChannels;
void v_APCI3120_InterruptDma(int irq, void *d)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
unsigned int next_dma_buf, samplesinbuf;
unsigned long low_word, high_word, var;
/*
+----------------------------------------------------------------------------+
| Function name :void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device|
-|*dev,comedi_subdevice *s,short *dma,short *data,int n) |
+|*dev,struct comedi_subdevice *s,short *dma,short *data,int n) |
| |
+----------------------------------------------------------------------------+
| Task : This function copies the data from DMA buffer to the |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| short *dma |
| short *data,int n |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-/*void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev,comedi_subdevice *s,short *dma,short *data,int n)
+/*void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev,struct comedi_subdevice *s,short *dma,short *data,int n)
{
int i,j,m;
}
*/
void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device * dev,
- comedi_subdevice * s, short * dma_buffer, unsigned int num_samples)
+ struct comedi_subdevice * s, short * dma_buffer, unsigned int num_samples)
{
devpriv->ui_AiActualScan +=
(s->async->cur_chan + num_samples) / devpriv->ui_AiScanLength;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, |
-| comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+| struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task :Configure Timer 2 |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, |
-| comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
+| struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : To start and stop the timer |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
+----------------------------------------------------------------------------+
| Function name : int i_APCI3120_InsnReadTimer(struct comedi_device *dev, |
-| comedi_subdevice *s,comedi_insn *insn, unsigned int *data) |
+| struct comedi_subdevice *s,comedi_insn *insn, unsigned int *data) |
| |
| |
+----------------------------------------------------------------------------+
| Task : read the Timer value |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
| |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnReadTimer(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_InsnReadTimer(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
BYTE b_Tmp;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnReadDigitalInput(struct comedi_device *dev, |
-| comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
+| struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
| |
| |
+----------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnReadDigitalInput(struct comedi_device * dev, comedi_subdevice
- * s, comedi_insn * insn, unsigned int * data)
+int i_APCI3120_InsnReadDigitalInput(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ comedi_insn *insn,
+ unsigned int *data)
{
UINT ui_Chan, ui_TmpValue;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnBitsDigitalInput(struct comedi_device *dev, |
-|comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
+|struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Reads the value of the Digital input Port i.e.4channels|
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
+----------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnBitsDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_InsnBitsDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device |
-| *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+| *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task :Configure the output memory ON or OFF |
| |
+----------------------------------------------------------------------------+
| Input Parameters :struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
+----------------------------------------------------------------------------+
*/
int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
if ((data[0] != 0) && (data[0] != 1)) {
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device *dev, |
-| comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
+| struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : write diatal output port |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
data[0] Value to be written
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device * dev, comedi_subdevice
- * s, comedi_insn * insn, unsigned int * data)
+int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device * dev,
+ struct comedi_subdevice *s,
+ comedi_insn *insn,
+ unsigned int *data)
{
if ((data[0] > this_board->i_DoMaxdata) || (data[0] < 0)) {
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device *dev,|
-|comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+|struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Write digiatl output |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
data[0] Value to be written
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device * dev, comedi_subdevice
- * s, comedi_insn * insn, unsigned int * data)
+int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ comedi_insn *insn,
+ unsigned int *data)
{
UINT ui_Temp1;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device *dev,|
-|comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
+|struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Write analog output |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
-| comedi_subdevice *s |
+| struct comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device * dev, comedi_subdevice
- * s, comedi_insn * insn, unsigned int * data)
+int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ comedi_insn *insn,
+ unsigned int *data)
{
UINT ui_Range, ui_Channel;
USHORT us_TmpValue;
// Function Declaration For APCI-3120
// Internal functions
-int i_APCI3120_SetupChannelList(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_SetupChannelList(struct comedi_device *dev, struct comedi_subdevice *s,
int n_chan, unsigned int *chanlist, char check);
int i_APCI3120_ExttrigEnable(struct comedi_device *dev);
int i_APCI3120_ExttrigDisable(struct comedi_device *dev);
-int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, comedi_subdevice *s);
+int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s);
int i_APCI3120_Reset(struct comedi_device *dev);
int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev,
- comedi_subdevice *s);
+ struct comedi_subdevice *s);
// Interrupt functions
void v_APCI3120_Interrupt(int irq, void *d);
-//UPDATE-0.7.57->0.7.68 void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev,comedi_subdevice *s,short *dma,short *data,int n);
+//UPDATE-0.7.57->0.7.68 void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev,struct comedi_subdevice *s,short *dma,short *data,int n);
void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
short *dma_buffer,
unsigned int num_samples);
int i_APCI3120_InterruptHandleEos(struct comedi_device *dev);
// TIMER
-int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3120_InsnReadTimer(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnReadTimer(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//DI
// for di read
-int i_APCI3120_InsnBitsDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnBitsDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3120_InsnReadDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnReadDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//DO
//int i_APCI3120_WriteDigitalOutput(struct comedi_device *dev, BYTE data);
int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
-int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//AO
//int i_APCI3120_Write1AnalogValue(struct comedi_device *dev,UINT ui_Range,UINT ui_Channel,UINT data );
-int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//AI HArdware layer
-int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd);
-int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, comedi_subdevice *s);
-//int i_APCI3120_CancelAnalogInput(struct comedi_device *dev, comedi_subdevice *s);
-int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, comedi_subdevice *s);
+int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
+//int i_APCI3120_CancelAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
+int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s);
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadDigitalInput |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_ReadDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3200_ReadDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ConfigDigitalOutput |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI3200_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_WriteDigitalOutput |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : writes To the digital Output Subdevice |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | comedi_subdevice *s : Subdevice Pointer |
+ | struct comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3200_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp = 0, ui_Temp1 = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadDigitalOutput |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3200_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3200_ConfigAnalogInput |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Analog Input Subdevice |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | comedi_subdevice *s : Subdevice Pointer |
+ | struct comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_ConfigAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3200_ConfigAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadAnalogInput |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_ReadAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3200_ReadAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_DummyValue = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_Read1AnalogInputChannel |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel |
+----------------------------------------------------------------------------+
*/
INT i_APCI3200_Read1AnalogInputChannel(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
UINT ui_EOC = 0;
UINT ui_ChannelNo = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCalibrationOffsetValue |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read calibration offset value of the selected channel|
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCalibrationGainValue |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read calibration gain value of the selected channel |
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCJCValue |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read CJC value of the selected channel |
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCJCCalOffset |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read CJC calibration offset value of the selected channel
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCJCGainValue |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read CJC calibration gain value
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_InsnBits_AnalogInput_Test |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Tests the Selected Anlog Input Channel |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | comedi_subdevice *s : Subdevice Pointer |
+ | struct comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
*/
INT i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
UINT ui_Configuration = 0;
INT i_Temp; //,i_TimeUnit;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_InsnWriteReleaseAnalogInput |
- | (struct comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Resets the channels |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | comedi_subdevice *s : Subdevice Pointer |
+ | struct comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer
+----------------------------------------------------------------------------+
*/
INT i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
i_APCI3200_Reset(dev);
return insn->n;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev|
- | ,comedi_subdevice *s,comedi_cmd *cmd) |
+ | ,struct comedi_subdevice *s,comedi_cmd *cmd) |
| |
+----------------------------------------------------------------------------+
| Task : Test validity for a command for cyclic anlog input |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
- | comedi_subdevice *s |
+ | struct comedi_subdevice *s |
| comedi_cmd *cmd |
| |
|
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_CommandTestAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI3200_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3200_StopCyclicAcquisition(struct comedi_device *dev,|
- | comedi_subdevice *s)|
+ | struct comedi_subdevice *s)|
| |
+----------------------------------------------------------------------------+
| Task : Stop the acquisition |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
- | comedi_subdevice *s |
+ | struct comedi_subdevice *s |
| |
+----------------------------------------------------------------------------+
| Return Value :0 |
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_StopCyclicAcquisition(struct comedi_device * dev, comedi_subdevice * s)
+int i_APCI3200_StopCyclicAcquisition(struct comedi_device * dev, struct comedi_subdevice * s)
{
UINT ui_Configuration = 0;
//i_InterruptFlag=0;
/*
+----------------------------------------------------------------------------+
| Function name : int i_APCI3200_CommandAnalogInput(struct comedi_device *dev, |
- | comedi_subdevice *s) |
+ | struct comedi_subdevice *s) |
| |
+----------------------------------------------------------------------------+
| Task : Does asynchronous acquisition |
| |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
- | comedi_subdevice *s |
+ | struct comedi_subdevice *s |
| |
| |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_CommandAnalogInput(struct comedi_device * dev, comedi_subdevice * s)
+int i_APCI3200_CommandAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
UINT ui_Configuration = 0;
int i_APCI3200_InterruptHandleEos(struct comedi_device * dev)
{
UINT ui_StatusRegister = 0;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
//BEGIN JK 18.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68
//comedi_async *async = s->async;
//AI
-INT i_APCI3200_ConfigAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3200_ConfigAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI3200_ReadAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3200_ReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
INT i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI3200_StopCyclicAcquisition(struct comedi_device *dev, comedi_subdevice *s);
+INT i_APCI3200_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s);
INT i_APCI3200_InterruptHandleEos(struct comedi_device *dev);
-INT i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd);
-INT i_APCI3200_CommandAnalogInput(struct comedi_device *dev, comedi_subdevice *s);
-INT i_APCI3200_ReadDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3200_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
+INT i_APCI3200_ReadDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//Interrupt
void v_APCI3200_Interrupt(int irq, void *d);
int i_APCI3200_ReadCalibrationGainValue(struct comedi_device *dev, UINT *data);
int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device *dev, UINT *data);
int i_APCI3200_Read1AnalogInputChannel(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
int i_APCI3200_ReadCJCCalGain(struct comedi_device *dev, unsigned int *data);
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ReadDigitalInput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3501_ReadDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3501_ReadDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ConfigDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3501_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+int i_APCI3501_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_WriteDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : writes To the digital Output Subdevice |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s : Subdevice Pointer |
+| struct comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3501_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3501_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ReadDigitalOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3501_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3501_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ConfigAnalogOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Analog Output Subdevice |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s : Subdevice Pointer |
+| struct comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3501_ConfigAnalogOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3501_ConfigAnalogOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
outl(data[0],
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_WriteAnalogOutput |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes To the Selected Anlog Output Channel |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| comedi_subdevice *s : Subdevice Pointer |
+| struct comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0, ul_Channel_no, ul_Polarity, ul_DAC_Ready = 0;;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ConfigTimerCounterWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
*/
INT i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
devpriv->tsk_Current = current;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_StartStopWriteTimerCounterWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Selected Timer , Counter or Watchdog |
*/
int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
int i_Temp;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ReadTimerCounterWatchdog |
-| (struct comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Selected Timer , Counter or Watchdog |
*/
int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
// Hardware Layer functions for Apci3501
//AO
-INT i_APCI3501_ConfigAnalogOutput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3501_ConfigAnalogOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI3501_WriteAnalogOutput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3501_WriteAnalogOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//DI
// for di read
-//INT i_APCI3501_ReadDigitalInput(struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
+//INT i_APCI3501_ReadDigitalInput(struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
-INT i_APCI3501_ReadDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3501_ReadDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//DO
-int i_APCI3501_ConfigDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+int i_APCI3501_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI3501_WriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3501_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI3501_ReadDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3501_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
INT i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//Interrupt
void v_APCI3501_Interrupt(int irq, void *d);
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_AnalogInputConfigOperatingMode |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_TimeBase = 0;
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnConfigAnalogInput |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnConfigAnalogInput(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnReadAnalogInput |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Configuration = (BYTE) CR_RANGE(insn->chanspec);
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnWriteAnalogOutput |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnWriteAnalogOutput(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
BYTE b_Range = (BYTE) CR_RANGE(insn->chanspec);
BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnConfigInitTTLIO |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnConfigInitTTLIO(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Command = 0;
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnBitsTTLIO |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnBitsTTLIO(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_ChannelCpt = 0;
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnReadTTLIO |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnReadTTLIO(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
INT i_ReturnValue = insn->n;
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnWriteTTLIO |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
+----------------------------------------------------------------------------+
| Function name :int i_APCI3XXX_InsnReadDigitalInput |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnReadDigitalInput(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
+----------------------------------------------------------------------------+
| Function name :int i_APCI3XXX_InsnBitsDigitalInput |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnBitsDigitalInput(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
DWORD dw_Temp = 0;
+----------------------------------------------------------------------------+
| Function name :int i_APCI3XXX_InsnBitsDigitalOutput |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnBitsDigitalOutput(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_ChannelCpt = 0;
+----------------------------------------------------------------------------+
| Function name :int i_APCI3XXX_InsnWriteDigitalOutput |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnWriteDigitalOutput(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Channel = CR_CHAN(insn->chanspec);
+----------------------------------------------------------------------------+
| Function name :int i_APCI3XXX_InsnReadDigitalOutput |
| (struct comedi_device *dev, |
-| comedi_subdevice *s, |
+| struct comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnReadDigitalOutput(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Channel = CR_CHAN(insn->chanspec);
int dev_minor);
/*read/write functions*/
-static int pci6208_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int pci6208_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pci6208_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int pci6208_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-//static int pci6208_dio_insn_bits(struct comedi_device *dev,comedi_subdevice *s,
+//static int pci6208_dio_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s,
// comedi_insn *insn,unsigned int *data);
-//static int pci6208_dio_insn_config(struct comedi_device *dev,comedi_subdevice *s,
+//static int pci6208_dio_insn_config(struct comedi_device *dev,struct comedi_subdevice *s,
// comedi_insn *insn,unsigned int *data);
/*
*/
static int pci6208_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int retval;
unsigned long io_base;
return 0;
}
-static int pci6208_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int pci6208_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i = 0, Data_Read;
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int pci6208_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int pci6208_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-//static int pci6208_dio_insn_bits(struct comedi_device *dev,comedi_subdevice *s,
+//static int pci6208_dio_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s,
// comedi_insn *insn,unsigned int *data)
//{
// if(insn->n!=2)return -EINVAL;
// return 2;
//}
-//static int pci6208_dio_insn_config(struct comedi_device *dev,comedi_subdevice *s,
+//static int pci6208_dio_insn_config(struct comedi_device *dev,struct comedi_subdevice *s,
// comedi_insn *insn,unsigned int *data)
//{
// int chan=CR_CHAN(insn->chanspec);
static int adl_pci7296_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pci_dev *pcidev;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int bus, slot;
int ret;
/* Digital IO */
-static int adl_pci7432_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci7432_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci7432_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci7432_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/* */
static int adl_pci7432_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pci_dev *pcidev;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int bus, slot;
printk("comedi: attempt to attach...\n");
return 0;
}
-static int adl_pci7432_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci7432_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
printk("comedi: pci7432_do_insn_bits called\n");
return 2;
}
-static int adl_pci7432_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci7432_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
printk("comedi: pci7432_di_insn_bits called\n");
detach:adl_pci8164_detach,
};
-static int adl_pci8164_insn_read_msts(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_msts(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_insn_read_ssts(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_ssts(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_insn_read_buf0(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_buf0(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_insn_read_buf1(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_buf1(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_insn_write_cmd(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_write_cmd(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_insn_write_otp(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_write_otp(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int adl_pci8164_insn_write_buf0(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
static int adl_pci8164_insn_write_buf1(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
static int adl_pci8164_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pci_dev *pcidev;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int bus, slot;
printk("comedi: attempt to attach...\n");
return 0;
}
-static int adl_pci8164_insn_read_msts(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_msts(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
return 2;
}
-static int adl_pci8164_insn_read_ssts(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_ssts(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
return 2;
}
-static int adl_pci8164_insn_read_buf0(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_buf0(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
return 2;
}
-static int adl_pci8164_insn_read_buf1(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_buf1(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
return 2;
}
-static int adl_pci8164_insn_write_cmd(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_write_cmd(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int axis, axis_reg;
return 2;
}
-static int adl_pci8164_insn_write_otp(struct comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_write_otp(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
}
static int adl_pci8164_insn_write_buf0(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
}
static int adl_pci8164_insn_write_buf1(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
static int pci9111_attach(struct comedi_device * dev, comedi_devconfig * it);
static int pci9111_detach(struct comedi_device * dev);
-static void pci9111_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
+static void pci9111_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int start_chan_index);
static const comedi_lrange pci9111_hr_ai_range = {
#undef AI_DO_CMD_DEBUG
-static int pci9111_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int pci9111_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
// Disable interrupts
static int
pci9111_ai_do_cmd_test(struct comedi_device * dev,
- comedi_subdevice * s, comedi_cmd * cmd)
+ struct comedi_subdevice * s, comedi_cmd * cmd)
{
int tmp;
int error = 0;
// Analog input command
//
-static int pci9111_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * subdevice)
+static int pci9111_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * subdevice)
{
comedi_cmd *async_cmd = &subdevice->async->cmd;
return 0;
}
-static void pci9111_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
+static void pci9111_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int start_chan_index)
{
unsigned int i, num_samples = num_bytes / sizeof(short);
static irqreturn_t pci9111_interrupt(int irq, void *p_device PT_REGS_ARG)
{
struct comedi_device *dev = p_device;
- comedi_subdevice *subdevice = dev->read_subdev;
+ struct comedi_subdevice *subdevice = dev->read_subdev;
comedi_async *async;
unsigned long irq_flags;
unsigned char intcsr;
#undef AI_INSN_DEBUG
static int pci9111_ai_insn_read(struct comedi_device * dev,
- comedi_subdevice * subdevice, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * subdevice, comedi_insn * insn, unsigned int * data)
{
int resolution =
((pci9111_board_struct *) dev->board_ptr)->ai_resolution;
static int
pci9111_ao_insn_write(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i;
//
static int pci9111_ao_insn_read(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i;
//
static int pci9111_di_insn_bits(struct comedi_device * dev,
- comedi_subdevice * subdevice, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * subdevice, comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
//
static int pci9111_do_insn_bits(struct comedi_device * dev,
- comedi_subdevice * subdevice, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * subdevice, comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
static int pci9111_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *subdevice;
+ struct comedi_subdevice *subdevice;
unsigned long io_base, io_range, lcr_io_base, lcr_io_range;
struct pci_dev *pci_device;
int error, i;
unsigned char cnt0_users; // bit field of 8254 CNT0 users (0-unused, 1-AO, 2-DI, 3-DO)
unsigned char exttrg_users; // bit field of external trigger users (0-AI, 1-AO, 2-DI, 3-DO)
unsigned int cnt0_divisor; // actual CNT0 divisor
- void (*int_ai_func) (struct comedi_device *, comedi_subdevice *, unsigned short, unsigned int, unsigned short); // ptr to actual interrupt AI function
+ void (*int_ai_func) (struct comedi_device *, struct comedi_subdevice *, unsigned short, unsigned int, unsigned short); // ptr to actual interrupt AI function
unsigned char ai16bits; // =1 16 bit card
unsigned char usedma; // =1 use DMA transfer and not INT
unsigned char useeoshandle; // =1 change WAKE_EOS DMA transfer to fit on every second
==============================================================================
*/
-static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
int n_chan, unsigned int *chanlist, int frontadd, int backadd);
-static int setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+static int setup_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
int n_chan, unsigned int *chanlist, int rot, int frontadd, int backadd,
int usedma, char eoshandle);
static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
static int pci9118_reset(struct comedi_device * dev);
static int pci9118_exttrg_add(struct comedi_device * dev, unsigned char source);
static int pci9118_exttrg_del(struct comedi_device * dev, unsigned char source);
-static int pci9118_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int pci9118_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static void pci9118_calc_divisors(char mode, struct comedi_device * dev,
- comedi_subdevice * s, unsigned int *tim1, unsigned int *tim2,
+ struct comedi_subdevice * s, unsigned int *tim1, unsigned int *tim2,
unsigned int flags, int chans, unsigned int *div1, unsigned int *div2,
char usessh, unsigned int chnsshfront);
/*
==============================================================================
*/
-static int pci9118_insn_read_ai(struct comedi_device * dev, comedi_subdevice * s,
+static int pci9118_insn_read_ai(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
/*
==============================================================================
*/
-static int pci9118_insn_write_ao(struct comedi_device * dev, comedi_subdevice * s,
+static int pci9118_insn_write_ao(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, chanreg, ch;
/*
==============================================================================
*/
-static int pci9118_insn_read_ao(struct comedi_device * dev, comedi_subdevice * s,
+static int pci9118_insn_read_ao(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, chan;
/*
==============================================================================
*/
-static int pci9118_insn_bits_di(struct comedi_device * dev, comedi_subdevice * s,
+static int pci9118_insn_bits_di(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[1] = inl(dev->iobase + PCI9118_DI) & 0xf;
/*
==============================================================================
*/
-static int pci9118_insn_bits_do(struct comedi_device * dev, comedi_subdevice * s,
+static int pci9118_insn_bits_do(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
}
static unsigned int defragment_dma_buffer(struct comedi_device * dev,
- comedi_subdevice * s, short * dma_buffer, unsigned int num_samples)
+ struct comedi_subdevice * s, short * dma_buffer, unsigned int num_samples)
{
unsigned int i = 0, j = 0;
unsigned int start_pos = devpriv->ai_add_front,
==============================================================================
*/
static unsigned int move_block_from_dma(struct comedi_device * dev,
- comedi_subdevice * s, short * dma_buffer, unsigned int num_samples)
+ struct comedi_subdevice * s, short * dma_buffer, unsigned int num_samples)
{
unsigned int num_bytes;
==============================================================================
*/
static char pci9118_decode_error_status(struct comedi_device * dev,
- comedi_subdevice * s, unsigned char m)
+ struct comedi_subdevice * s, unsigned char m)
{
if (m & 0x100) {
comedi_error(dev, "A/D FIFO Full status (Fatal Error!)");
return 0;
}
-static void pci9118_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
+static void pci9118_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int start_chan_index)
{
unsigned int i, num_samples = num_bytes / sizeof(short);
==============================================================================
*/
static void interrupt_pci9118_ai_onesample(struct comedi_device * dev,
- comedi_subdevice * s, unsigned short int_adstat, unsigned int int_amcc,
+ struct comedi_subdevice * s, unsigned short int_adstat, unsigned int int_amcc,
unsigned short int_daq)
{
register short sampl;
/*
==============================================================================
*/
-static void interrupt_pci9118_ai_dma(struct comedi_device * dev, comedi_subdevice * s,
+static void interrupt_pci9118_ai_dma(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned short int_adstat, unsigned int int_amcc,
unsigned short int_daq)
{
/*
==============================================================================
*/
-static int pci9118_ai_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int pci9118_ai_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum)
{
if (trignum != devpriv->ai_inttrig_start)
/*
==============================================================================
*/
-static int pci9118_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int pci9118_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
/*
==============================================================================
*/
-static int pci9118_ai_docmd_sampl(struct comedi_device * dev, comedi_subdevice * s)
+static int pci9118_ai_docmd_sampl(struct comedi_device * dev, struct comedi_subdevice * s)
{
DPRINTK("adl_pci9118 EDBG: BGN: pci9118_ai_docmd_sampl(%d,) [%d]\n",
dev->minor, devpriv->ai_do);
/*
==============================================================================
*/
-static int pci9118_ai_docmd_dma(struct comedi_device * dev, comedi_subdevice * s)
+static int pci9118_ai_docmd_dma(struct comedi_device * dev, struct comedi_subdevice * s)
{
DPRINTK("adl_pci9118 EDBG: BGN: pci9118_ai_docmd_dma(%d,) [%d,%d]\n",
dev->minor, devpriv->ai_do, devpriv->usedma);
/*
==============================================================================
*/
-static int pci9118_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int pci9118_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int addchans = 0;
/*
==============================================================================
*/
-static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
int n_chan, unsigned int *chanlist, int frontadd, int backadd)
{
unsigned int i, differencial = 0, bipolar = 0;
/*
==============================================================================
*/
-static int setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+static int setup_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
int n_chan, unsigned int *chanlist, int rot, int frontadd, int backadd,
int usedma, char useeos)
{
calculate 8254 divisors if they are used for dual timing
*/
static void pci9118_calc_divisors(char mode, struct comedi_device * dev,
- comedi_subdevice * s, unsigned int *tim1, unsigned int *tim2,
+ struct comedi_subdevice * s, unsigned int *tim1, unsigned int *tim2,
unsigned int flags, int chans, unsigned int *div1, unsigned int *div2,
char usessh, unsigned int chnsshfront)
{
/*
==============================================================================
*/
-static int pci9118_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int pci9118_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
if (devpriv->usedma)
outl(inl(devpriv->iobase_a + AMCC_OP_REG_MCSR) & (~EN_A2P_TRANSFERS), devpriv->iobase_a + AMCC_OP_REG_MCSR); // stop DMA
*/
static int pci9118_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret, pages, i;
unsigned short master;
unsigned int irq;
num_names: sizeof(adq12b_boards) / sizeof(adq12b_board),
};
-static int adq12b_ai_rinsn(struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
-static int adq12b_di_insn_bits(struct comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,unsigned int *data);
-static int adq12b_do_insn_bits(struct comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,unsigned int *data);
+static int adq12b_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
+static int adq12b_di_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data);
+static int adq12b_do_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data);
/*
* Attach is called by the Comedi core to configure the driver
*/
static int adq12b_attach(struct comedi_device *dev,comedi_devconfig *it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
int unipolar, differential;
* mode.
*/
-static int adq12b_ai_rinsn(struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data)
+static int adq12b_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data)
{
int n, i;
int range, channel;
}
-static int adq12b_di_insn_bits(struct comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,unsigned int *data)
+static int adq12b_di_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data)
{
/* only bits 0-4 have information about digital inputs */
}
-static int adq12b_do_insn_bits(struct comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,unsigned int *data)
+static int adq12b_do_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data)
{
int channel;
==============================================================================
*/
-static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan);
-static void setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+static void setup_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan, unsigned int seglen);
static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2);
static int pci1710_reset(struct comedi_device * dev);
-static int pci171x_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int pci171x_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static const unsigned int muxonechan[] = { 0x0000, 0x0101, 0x0202, 0x0303, 0x0404, 0x0505, 0x0606, 0x0707, // used for gain list programming
0x0808, 0x0909, 0x0a0a, 0x0b0b, 0x0c0c, 0x0d0d, 0x0e0e, 0x0f0f,
/*
==============================================================================
*/
-static int pci171x_insn_read_ai(struct comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_read_ai(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, timeout;
/*
==============================================================================
*/
-static int pci171x_insn_write_ao(struct comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_write_ao(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, chan, range, ofs;
/*
==============================================================================
*/
-static int pci171x_insn_read_ao(struct comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_read_ao(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, chan;
/*
==============================================================================
*/
-static int pci171x_insn_bits_di(struct comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_bits_di(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[1] = inw(dev->iobase + PCI171x_DI);
/*
==============================================================================
*/
-static int pci171x_insn_bits_do(struct comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_bits_do(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
/*
==============================================================================
*/
-static int pci171x_insn_counter_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_counter_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int msb, lsb, ccntrl;
/*
==============================================================================
*/
-static int pci171x_insn_counter_write(struct comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_counter_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
uint msb, lsb, ccntrl, status;
==============================================================================
*/
static int pci171x_insn_counter_config(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
#ifdef unused
/* This doesn't work like a normal Comedi counter config */
/*
==============================================================================
*/
-static int pci1720_insn_write_ao(struct comedi_device * dev, comedi_subdevice * s,
+static int pci1720_insn_write_ao(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, rangereg, chan;
static void interrupt_pci1710_every_sample(void *d)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
int m;
#ifdef PCI171x_PARANOIDCHECK
short sampl;
/*
==============================================================================
*/
-static int move_block_from_fifo(struct comedi_device * dev, comedi_subdevice * s,
+static int move_block_from_fifo(struct comedi_device * dev, struct comedi_subdevice * s,
int n, int turn)
{
int i, j;
static void interrupt_pci1710_half_fifo(void *d)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
int m, samplesinbuf;
DPRINTK("adv_pci1710 EDBG: BGN: interrupt_pci1710_half_fifo(...)\n");
==============================================================================
*/
static int pci171x_ai_docmd_and_mode(int mode, struct comedi_device * dev,
- comedi_subdevice * s)
+ struct comedi_subdevice * s)
{
unsigned int divisor1, divisor2;
unsigned int seglen;
/*
==============================================================================
*/
-static int pci171x_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int pci171x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
/*
==============================================================================
*/
-static int pci171x_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int pci171x_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
If it's ok, then program scan/gain logic.
This works for all cards.
*/
-static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan)
{
unsigned int chansegment[32];
return seglen;
}
-static void setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+static void setup_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan, unsigned int seglen)
{
unsigned int i, range, chanprog;
/*
==============================================================================
*/
-static int pci171x_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int pci171x_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
DPRINTK("adv_pci1710 EDBG: BGN: pci171x_ai_cancel(...)\n");
*/
static int pci1710_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret, subdev, n_subdevices;
unsigned int irq;
unsigned long iobase;
return 0;
}
-static int pci1723_insn_read_ao(struct comedi_device * dev, comedi_subdevice * s,
+static int pci1723_insn_read_ao(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, chan;
/*
analog data output;
*/
-static int pci1723_ao_write_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int pci1723_ao_write_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, chan;
/*
digital i/o config/query
*/
-static int pci1723_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int pci1723_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int mask;
/*
digital i/o bits read/write
*/
-static int pci1723_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pci1723_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
*/
static int pci1723_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret, subdev, n_subdevices;
struct pci_dev *pcidev;
unsigned int iobase;
/*
==============================================================================
*/
-static int pci_dio_insn_bits_di_b(struct comedi_device * dev, comedi_subdevice * s,
+static int pci_dio_insn_bits_di_b(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
const diosubd_data *d = (const diosubd_data *)s->private;
/*
==============================================================================
*/
-static int pci_dio_insn_bits_di_w(struct comedi_device * dev, comedi_subdevice * s,
+static int pci_dio_insn_bits_di_w(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
const diosubd_data *d = (const diosubd_data *)s->private;
/*
==============================================================================
*/
-static int pci_dio_insn_bits_do_b(struct comedi_device * dev, comedi_subdevice * s,
+static int pci_dio_insn_bits_do_b(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
const diosubd_data *d = (const diosubd_data *)s->private;
/*
==============================================================================
*/
-static int pci_dio_insn_bits_do_w(struct comedi_device * dev, comedi_subdevice * s,
+static int pci_dio_insn_bits_do_w(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
const diosubd_data *d = (const diosubd_data *)s->private;
/*
==============================================================================
*/
-static int pci1760_insn_bits_di(struct comedi_device * dev, comedi_subdevice * s,
+static int pci1760_insn_bits_di(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[1] = inb(dev->iobase + IMB3);
/*
==============================================================================
*/
-static int pci1760_insn_bits_do(struct comedi_device * dev, comedi_subdevice * s,
+static int pci1760_insn_bits_do(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int ret;
/*
==============================================================================
*/
-static int pci1760_insn_cnt_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pci1760_insn_cnt_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int ret, n;
/*
==============================================================================
*/
-static int pci1760_insn_cnt_write(struct comedi_device * dev, comedi_subdevice * s,
+static int pci1760_insn_cnt_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int ret;
*/
static int pci1760_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int subdev = 0;
s = dev->subdevices + subdev;
/*
==============================================================================
*/
-static int pci_dio_add_di(struct comedi_device * dev, comedi_subdevice * s,
+static int pci_dio_add_di(struct comedi_device * dev, struct comedi_subdevice * s,
const diosubd_data * d, int subdev)
{
s->type = COMEDI_SUBD_DI;
/*
==============================================================================
*/
-static int pci_dio_add_do(struct comedi_device * dev, comedi_subdevice * s,
+static int pci_dio_add_do(struct comedi_device * dev, struct comedi_subdevice * s,
const diosubd_data * d, int subdev)
{
s->type = COMEDI_SUBD_DO;
*/
static int pci_dio_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret, subdev, n_subdevices, i, j;
unsigned long iobase;
struct pci_dev *pcidev;
static int pci_dio_detach(struct comedi_device * dev)
{
int i, j;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int subdev;
if (dev->private) {
#define devpriv ((aio12_8_private *) dev->private)
-static int aio_aio12_8_ai_read(struct comedi_device * dev, comedi_subdevice * s,
+static int aio_aio12_8_ai_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
return n;
}
-static int aio_aio12_8_ao_read(struct comedi_device * dev, comedi_subdevice * s,
+static int aio_aio12_8_ao_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return insn->n;
}
-static int aio_aio12_8_ao_write(struct comedi_device * dev, comedi_subdevice * s,
+static int aio_aio12_8_ao_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
static int aio_aio12_8_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int iobase;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
iobase = it->options[0];
if (!request_region(iobase, 24, "aio_aio12_8")) {
};
static int aio_iiro_16_dio_insn_bits_read(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
static int aio_iiro_16_dio_insn_bits_write(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
static int aio_iiro_16_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int iobase;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
printk("comedi%d: aio_iiro_16: ", dev->minor);
}
static int aio_iiro_16_dio_insn_bits_write(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int aio_iiro_16_dio_insn_bits_read(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
* 'insn_bits' function for an 'INTERRUPT' subdevice.
*/
static int
-dio200_subdev_intr_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_intr_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
dio200_subdev_intr *subpriv = s->private;
/*
* Called to stop acquisition for an 'INTERRUPT' subdevice.
*/
-static void dio200_stop_intr(struct comedi_device * dev, comedi_subdevice * s)
+static void dio200_stop_intr(struct comedi_device * dev, struct comedi_subdevice * s)
{
dio200_subdev_intr *subpriv = s->private;
/*
* Called to start acquisition for an 'INTERRUPT' subdevice.
*/
-static int dio200_start_intr(struct comedi_device * dev, comedi_subdevice * s)
+static int dio200_start_intr(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned int n;
unsigned isn_bits;
* Internal trigger function to start acquisition for an 'INTERRUPT' subdevice.
*/
static int
-dio200_inttrig_start_intr(struct comedi_device * dev, comedi_subdevice * s,
+dio200_inttrig_start_intr(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum)
{
dio200_subdev_intr *subpriv;
* This is called from the interrupt service routine to handle a read
* scan on an 'INTERRUPT' subdevice.
*/
-static int dio200_handle_read_intr(struct comedi_device * dev, comedi_subdevice * s)
+static int dio200_handle_read_intr(struct comedi_device * dev, struct comedi_subdevice * s)
{
dio200_subdev_intr *subpriv = s->private;
unsigned triggered;
/*
* 'cancel' function for an 'INTERRUPT' subdevice.
*/
-static int dio200_subdev_intr_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int dio200_subdev_intr_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
dio200_subdev_intr *subpriv = s->private;
unsigned long flags;
* 'do_cmdtest' function for an 'INTERRUPT' subdevice.
*/
static int
-dio200_subdev_intr_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
/*
* 'do_cmd' function for an 'INTERRUPT' subdevice.
*/
-static int dio200_subdev_intr_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int dio200_subdev_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
dio200_subdev_intr *subpriv = s->private;
* This function initializes an 'INTERRUPT' subdevice.
*/
static int
-dio200_subdev_intr_init(struct comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_intr_init(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long iobase, unsigned valid_isns, int has_int_sce)
{
dio200_subdev_intr *subpriv;
* This function cleans up an 'INTERRUPT' subdevice.
*/
static void
-dio200_subdev_intr_cleanup(struct comedi_device * dev, comedi_subdevice * s)
+dio200_subdev_intr_cleanup(struct comedi_device * dev, struct comedi_subdevice * s)
{
dio200_subdev_intr *subpriv = s->private;
* Handle 'insn_read' for an '8254' counter subdevice.
*/
static int
-dio200_subdev_8254_read(struct comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_8254_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
dio200_subdev_8254 *subpriv = s->private;
* Handle 'insn_write' for an '8254' counter subdevice.
*/
static int
-dio200_subdev_8254_write(struct comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_8254_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
dio200_subdev_8254 *subpriv = s->private;
* Handle 'insn_config' for an '8254' counter subdevice.
*/
static int
-dio200_subdev_8254_config(struct comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_8254_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
dio200_subdev_8254 *subpriv = s->private;
* offset is the offset to the 8254 chip.
*/
static int
-dio200_subdev_8254_init(struct comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_8254_init(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long iobase, unsigned offset, int has_clk_gat_sce)
{
dio200_subdev_8254 *subpriv;
* This function cleans up an '8254' counter subdevice.
*/
static void
-dio200_subdev_8254_cleanup(struct comedi_device * dev, comedi_subdevice * s)
+dio200_subdev_8254_cleanup(struct comedi_device * dev, struct comedi_subdevice * s)
{
dio200_subdev_intr *subpriv = s->private;
*/
static int dio200_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase = 0;
unsigned int irq = 0;
#ifdef CONFIG_COMEDI_PCI
if (dev->subdevices) {
layout = thislayout;
for (n = 0; n < dev->n_subdevices; n++) {
- comedi_subdevice *s = &dev->subdevices[n];
+ struct comedi_subdevice *s = &dev->subdevices[n];
switch (layout->sdtype[n]) {
case sd_8254:
dio200_subdev_8254_cleanup(dev, s);
static void pc236_intr_disable(struct comedi_device * dev);
static void pc236_intr_enable(struct comedi_device * dev);
static int pc236_intr_check(struct comedi_device * dev);
-static int pc236_intr_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int pc236_intr_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pc236_intr_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int pc236_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int pc236_intr_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int pc236_intr_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int pc236_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int pc236_intr_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static irqreturn_t pc236_interrupt(int irq, void *d PT_REGS_ARG);
/*
*/
static int pc236_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase = 0;
unsigned int irq = 0;
#ifdef CONFIG_COMEDI_PCI
* Input from subdevice 1.
* Copied from the comedi_parport driver.
*/
-static int pc236_intr_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int pc236_intr_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[1] = 0;
* Subdevice 1 command test.
* Copied from the comedi_parport driver.
*/
-static int pc236_intr_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int pc236_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
/*
* Subdevice 1 command.
*/
-static int pc236_intr_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int pc236_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
pc236_intr_enable(dev);
/*
* Subdevice 1 cancel command.
*/
-static int pc236_intr_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int pc236_intr_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
pc236_intr_disable(dev);
static irqreturn_t pc236_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 1;
+ struct comedi_subdevice *s = dev->subdevices + 1;
int handled;
handled = pc236_intr_check(dev);
static int pc263_request_region(unsigned minor, unsigned long from,
unsigned long extent);
-static int pc263_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pc263_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pc263_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int pc263_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/*
*/
static int pc263_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase = 0;
#ifdef CONFIG_COMEDI_PCI
struct pci_dev *pci_dev = NULL;
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int pc263_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pc263_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int pc263_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int pc263_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 1)
* 'insn_write' function for AO subdevice.
*/
static int
-pci224_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+pci224_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
* command.
*/
static int
-pci224_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+pci224_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
/*
* Kills a command running on the AO subdevice.
*/
-static void pci224_ao_stop(struct comedi_device * dev, comedi_subdevice * s)
+static void pci224_ao_stop(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
/*
* Handles start of acquisition for the AO subdevice.
*/
-static void pci224_ao_start(struct comedi_device * dev, comedi_subdevice * s)
+static void pci224_ao_start(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned long flags;
/*
* Handles interrupts from the DAC FIFO.
*/
-static void pci224_ao_handle_fifo(struct comedi_device * dev, comedi_subdevice * s)
+static void pci224_ao_handle_fifo(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int num_scans;
* Internal trigger function to start acquisition on AO subdevice.
*/
static int
-pci224_ao_inttrig_start(struct comedi_device * dev, comedi_subdevice * s,
+pci224_ao_inttrig_start(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum)
{
if (trignum != 0)
* 'do_cmdtest' function for AO subdevice.
*/
static int
-pci224_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s, comedi_cmd * cmd)
+pci224_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, comedi_cmd * cmd)
{
int err = 0;
unsigned int tmp;
/*
* 'do_cmd' function for AO subdevice.
*/
-static int pci224_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int pci224_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int range;
/*
* 'cancel' function for AO subdevice.
*/
-static int pci224_ao_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int pci224_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
pci224_ao_stop(dev, s);
return 0;
* 'munge' data for AO command.
*/
static void
-pci224_ao_munge(struct comedi_device * dev, comedi_subdevice * s, void *data,
+pci224_ao_munge(struct comedi_device * dev, struct comedi_subdevice * s, void *data,
unsigned int num_bytes, unsigned int chan_index)
{
comedi_async *async = s->async;
static irqreturn_t pci224_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = &dev->subdevices[0];
+ struct comedi_subdevice *s = &dev->subdevices[0];
comedi_cmd *cmd;
unsigned char intstat, valid_intstat;
unsigned char curenab;
*/
static int pci224_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
struct pci_dev *pci_dev;
unsigned int irq;
int bus = 0, slot = 0;
comedi_free_irq(dev->irq, dev);
}
if (dev->subdevices) {
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
s = dev->subdevices + 0;
/* AO subdevice */
COMEDI_PCI_INITCLEANUP(driver_amplc_pci230, pci230_pci_table);
-static int pci230_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pci230_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pci230_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static void pci230_ct_setup_ns_mode(struct comedi_device * dev, unsigned int ct,
unsigned int mode, uint64_t ns, unsigned int round);
static void pci230_ns_to_single_timer(unsigned int *ns, unsigned int round);
static void pci230_cancel_ct(struct comedi_device * dev, unsigned int ct);
static irqreturn_t pci230_interrupt(int irq, void *d PT_REGS_ARG);
-static int pci230_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int pci230_ao_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int pci230_ao_cancel(struct comedi_device * dev, comedi_subdevice * s);
-static void pci230_ao_stop(struct comedi_device * dev, comedi_subdevice * s);
-static void pci230_handle_ao_nofifo(struct comedi_device * dev, comedi_subdevice * s);
-static int pci230_handle_ao_fifo(struct comedi_device * dev, comedi_subdevice * s);
-static int pci230_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int pci230_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
+static void pci230_ao_stop(struct comedi_device * dev, struct comedi_subdevice * s);
+static void pci230_handle_ao_nofifo(struct comedi_device * dev, struct comedi_subdevice * s);
+static int pci230_handle_ao_fifo(struct comedi_device * dev, struct comedi_subdevice * s);
+static int pci230_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int pci230_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int pci230_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
-static void pci230_ai_stop(struct comedi_device * dev, comedi_subdevice * s);
-static void pci230_handle_ai(struct comedi_device * dev, comedi_subdevice * s);
+static int pci230_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int pci230_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
+static void pci230_ai_stop(struct comedi_device * dev, struct comedi_subdevice * s);
+static void pci230_handle_ai(struct comedi_device * dev, struct comedi_subdevice * s);
static short pci230_ai_read(struct comedi_device * dev)
{
*/
static int pci230_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase1, iobase2;
/* PCI230's I/O spaces 1 and 2 respectively. */
struct pci_dev *pci_dev;
/*
* COMEDI_SUBD_AI instruction;
*/
-static int pci230_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int n, i;
/*
* COMEDI_SUBD_AO instructions;
*/
-static int pci230_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int pci230_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int pci230_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
}
static int pci230_ao_inttrig_scan_begin(struct comedi_device * dev,
- comedi_subdevice * s, unsigned int trig_num)
+ struct comedi_subdevice * s, unsigned int trig_num)
{
unsigned long irqflags;
return 1;
}
-static void pci230_ao_start(struct comedi_device * dev, comedi_subdevice * s)
+static void pci230_ao_start(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
}
}
-static int pci230_ao_inttrig_start(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_inttrig_start(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trig_num)
{
if (trig_num != 0)
return 1;
}
-static int pci230_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int pci230_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned short daccon;
unsigned int range;
return !err;
}
-static int pci230_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
}
static void pci230_ai_update_fifo_trigger_level(struct comedi_device * dev,
- comedi_subdevice * s)
+ struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int scanlen = cmd->scan_end_arg;
}
}
-static int pci230_ai_inttrig_convert(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ai_inttrig_convert(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trig_num)
{
unsigned long irqflags;
}
static int pci230_ai_inttrig_scan_begin(struct comedi_device * dev,
- comedi_subdevice * s, unsigned int trig_num)
+ struct comedi_subdevice * s, unsigned int trig_num)
{
unsigned long irqflags;
unsigned char zgat;
return 1;
}
-static void pci230_ai_start(struct comedi_device * dev, comedi_subdevice * s)
+static void pci230_ai_start(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long irqflags;
unsigned short conv;
}
}
-static int pci230_ai_inttrig_start(struct comedi_device * dev, comedi_subdevice * s,
+static int pci230_ai_inttrig_start(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trig_num)
{
if (trig_num != 0)
return 1;
}
-static int pci230_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int pci230_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned int i, chan, range, diff;
unsigned int res_mask;
{
unsigned char status_int, valid_status_int;
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long irqflags;
/* Read interrupt status/enable register. */
return IRQ_HANDLED;
}
-static void pci230_handle_ao_nofifo(struct comedi_device * dev, comedi_subdevice * s)
+static void pci230_handle_ao_nofifo(struct comedi_device * dev, struct comedi_subdevice * s)
{
short data;
int i, ret;
/* Loads DAC FIFO (if using it) from buffer. */
/* Returns 0 if AO finished due to completion or error, 1 if still going. */
-static int pci230_handle_ao_fifo(struct comedi_device * dev, comedi_subdevice * s)
+static int pci230_handle_ao_fifo(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
return running;
}
-static void pci230_handle_ai(struct comedi_device * dev, comedi_subdevice * s)
+static void pci230_handle_ai(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned int events = 0;
unsigned int status_fifo;
}
}
-static void pci230_ao_stop(struct comedi_device * dev, comedi_subdevice * s)
+static void pci230_ao_stop(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long irqflags;
unsigned char intsrc;
put_all_resources(dev, OWNER_AOCMD);
}
-static int pci230_ao_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int pci230_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
pci230_ao_stop(dev, s);
return 0;
}
-static void pci230_ai_stop(struct comedi_device * dev, comedi_subdevice * s)
+static void pci230_ai_stop(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long irqflags;
comedi_cmd *cmd;
put_all_resources(dev, OWNER_AICMD);
}
-static int pci230_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int pci230_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
pci230_ai_stop(dev, s);
return 0;
}
static int c6xdigio_pwmo_insn_read(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
printk("c6xdigio_pwmo_insn_read %x\n", insn->n);
return insn->n;
}
static int c6xdigio_pwmo_insn_write(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
}
//static int c6xdigio_ei_init_insn_read(struct comedi_device *dev,
-// comedi_subdevice *s,
+// struct comedi_subdevice *s,
// comedi_insn *insn,
// unsigned int *data)
//{
//}
//static int c6xdigio_ei_init_insn_write(struct comedi_device *dev,
-// comedi_subdevice *s,
+// struct comedi_subdevice *s,
// comedi_insn *insn,
// unsigned int *data)
//{
//}
static int c6xdigio_ei_insn_read(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
// printk("c6xdigio_ei__insn_read %x\n", insn->n);
int n;
int result = 0;
unsigned long iobase;
unsigned int irq;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
iobase = it->options[0];
printk("comedi%d: c6xdigio: 0x%04lx\n", dev->minor, iobase);
};
static irqreturn_t das16cs_interrupt(int irq, void *d PT_REGS_ARG);
-static int das16cs_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16cs_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int das16cs_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int das16cs_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int das16cs_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16cs_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16cs_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16cs_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16cs_timer_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_timer_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16cs_timer_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_timer_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int get_prodid(struct comedi_device * dev, struct pcmcia_device *link)
static int das16cs_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pcmcia_device *link;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret;
int i;
* "instructions" read/write data in "one-shot" or "software-triggered"
* mode.
*/
-static int das16cs_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int das16cs_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int das16cs_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
return -EINVAL;
}
-static int das16cs_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int das16cs_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int das16cs_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int das16cs_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int das16cs_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
return insn->n;
}
-static int das16cs_timer_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_timer_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
return -EINVAL;
}
-static int das16cs_timer_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int das16cs_timer_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
return -EINVAL;
detach:cb_pcidas_detach,
};
-static int cb_pcidas_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ai_config_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcidas_ao_nofifo_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_nofifo_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcidas_ao_fifo_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_fifo_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcidas_ao_readback_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcidas_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int cb_pcidas_ao_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int cb_pcidas_ao_inttrig(struct comedi_device * dev, comedi_subdevice * subdev,
+static int cb_pcidas_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int cb_pcidas_ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * subdev,
unsigned int trig_num);
-static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
static irqreturn_t cb_pcidas_interrupt(int irq, void *d PT_REGS_ARG);
static void handle_ao_interrupt(struct comedi_device * dev, unsigned int status);
-static int cb_pcidas_cancel(struct comedi_device * dev, comedi_subdevice * s);
-static int cb_pcidas_ao_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int cb_pcidas_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
+static int cb_pcidas_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static void cb_pcidas_load_counters(struct comedi_device * dev, unsigned int *ns,
int round_flags);
-static int eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int caldac_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int caldac_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int caldac_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int caldac_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int trimpot_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int trimpot_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int cb_pcidas_trimpot_write(struct comedi_device * dev, unsigned int channel,
unsigned int value);
-static int trimpot_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int trimpot_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dac08_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dac08_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int dac08_write(struct comedi_device * dev, unsigned int value);
-static int dac08_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dac08_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int caldac_8800_write(struct comedi_device * dev, unsigned int address,
uint8_t value);
*/
static int cb_pcidas_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
struct pci_dev *pcidev;
int index;
int i;
* "instructions" read/write data in "one-shot" or "software-triggered"
* mode.
*/
-static int cb_pcidas_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i;
return 2;
}
-static int ai_config_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int id = data[0];
}
// analog output insn for pcidas-1000 and 1200 series
-static int cb_pcidas_ao_nofifo_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_nofifo_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel;
}
// analog output insn for pcidas-1602 series
-static int cb_pcidas_ao_fifo_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_fifo_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel;
// analog output readback insn
// XXX loses track of analog output value back after an analog ouput command is executed
-static int cb_pcidas_ao_readback_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao_value[CR_CHAN(insn->chanspec)];
return 1;
}
-static int eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
uint8_t nvram_data;
return 1;
}
-static int caldac_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int caldac_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
const unsigned int channel = CR_CHAN(insn->chanspec);
return caldac_8800_write(dev, channel, data[0]);
}
-static int caldac_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int caldac_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->caldac_value[CR_CHAN(insn->chanspec)];
return 1;
}
-static int dac08_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dac08_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
return dac08_write(dev, data[0]);
}
-static int dac08_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dac08_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->dac08_value;
return 1;
}
-static int trimpot_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int trimpot_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int channel = CR_CHAN(insn->chanspec);
return cb_pcidas_trimpot_write(dev, channel, data[0]);
}
-static int trimpot_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int trimpot_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int channel = CR_CHAN(insn->chanspec);
return 1;
}
-static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int cb_pcidas_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int cb_pcidas_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
return 0;
}
-static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int cb_pcidas_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int cb_pcidas_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
return 0;
}
-static int cb_pcidas_ao_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trig_num)
{
unsigned int num_bytes, num_points = thisboard->fifo_size;
static irqreturn_t cb_pcidas_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
comedi_async *async;
int status, s5933_status;
int half_fifo = thisboard->fifo_size / 2;
static void handle_ao_interrupt(struct comedi_device * dev, unsigned int status)
{
- comedi_subdevice *s = dev->write_subdev;
+ struct comedi_subdevice *s = dev->write_subdev;
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
unsigned int half_fifo = thisboard->fifo_size / 2;
}
// cancel analog input command
-static int cb_pcidas_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int cb_pcidas_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
}
// cancel analog output command
-static int cb_pcidas_ao_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int cb_pcidas_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
detach:detach,
};
-static int ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ai_config_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ao_readback_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int ao_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int ao_inttrig(struct comedi_device * dev, comedi_subdevice * subdev,
+static int ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * subdev,
unsigned int trig_num);
-static int ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG);
-static int ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
-static int ao_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
+static int ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static int dio_callback(int dir, int port, int data, unsigned long arg);
static int dio_callback_4020(int dir, int port, int data, unsigned long arg);
-static int di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dio_60xx_config_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dio_60xx_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dio_60xx_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int dio_60xx_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int calib_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int calib_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int calib_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int calib_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ad8402_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int ad8402_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static void ad8402_write(struct comedi_device * dev, unsigned int channel,
unsigned int value);
-static int ad8402_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int ad8402_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static void check_adc_timing(struct comedi_device * dev, comedi_cmd * cmd);
static unsigned int get_divisor(unsigned int ns, unsigned int flags);
*/
static int setup_subdevices(struct comedi_device * dev)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
void *dio_8255_iobase;
int i;
return 0;
}
-static int ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int bits = 0, n, i;
return -EINVAL;
}
-static int ai_config_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int id = data[0];
return -EINVAL;
}
-static int ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
}
}
-static int ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
// read num_samples from 16 bit wide ai fifo
static void pio_drain_ai_fifo_16(struct comedi_device * dev)
{
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
unsigned int i;
*/
static void pio_drain_ai_fifo_32(struct comedi_device * dev)
{
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
unsigned int i;
void handle_ai_interrupt(struct comedi_device * dev, unsigned short status,
unsigned int plx_status)
{
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
uint8_t dma1_status;
static void handle_ao_interrupt(struct comedi_device * dev, unsigned short status,
unsigned int plx_status)
{
- comedi_subdevice *s = dev->write_subdev;
+ struct comedi_subdevice *s = dev->write_subdev;
comedi_async *async;
comedi_cmd *cmd;
uint8_t dma0_status;
comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
}
-static int ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
return 0;
}
-static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
return 1;
}
-static int ao_readback_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = priv(dev)->ao_value[CR_CHAN(insn->chanspec)];
return 1;
}
-static int ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
return 0;
}
-static int ao_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trig_num)
{
comedi_cmd *cmd = &s->async->cmd;
return 0;
}
-static int ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int ao_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
writew(0x0, priv(dev)->main_iobase + DAC_CONTROL0_REG);
abort_dma(dev, 0);
}
}
-static int di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
return 2;
}
-static int do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] &= 0xf;
return 2;
}
-static int dio_60xx_config_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dio_60xx_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int mask;
return 1;
}
-static int dio_60xx_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int dio_60xx_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
}
}
-static int calib_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int calib_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel = CR_CHAN(insn->chanspec);
return 1;
}
-static int calib_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int calib_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int channel = CR_CHAN(insn->chanspec);
}
/* for pci-das6402/16, channel 0 is analog input gain and channel 1 is offset */
-static int ad8402_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int ad8402_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel = CR_CHAN(insn->chanspec);
return 1;
}
-static int ad8402_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int ad8402_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int channel = CR_CHAN(insn->chanspec);
return value;
}
-static int eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = read_eeprom(dev, CR_CHAN(insn->chanspec));
static int cb_pcidda_attach(struct comedi_device * dev, comedi_devconfig * it);
static int cb_pcidda_detach(struct comedi_device * dev);
-//static int cb_pcidda_ai_rinsn(struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
-static int cb_pcidda_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+//static int cb_pcidda_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
+static int cb_pcidda_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-//static int cb_pcidda_ai_cmd(struct comedi_device *dev,comedi_subdevice *s);
-//static int cb_pcidda_ai_cmdtest(struct comedi_device *dev,comedi_subdevice *s, comedi_cmd *cmd);
+//static int cb_pcidda_ai_cmd(struct comedi_device *dev,struct comedi_subdevice *s);
+//static int cb_pcidda_ai_cmdtest(struct comedi_device *dev,struct comedi_subdevice *s, comedi_cmd *cmd);
//static int cb_pcidda_ns_to_timer(unsigned int *ns,int round);
static unsigned int cb_pcidda_serial_in(struct comedi_device * dev);
static void cb_pcidda_serial_out(struct comedi_device * dev, unsigned int value,
*/
static int cb_pcidda_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
struct pci_dev *pcidev;
int index;
* I will program this later... ;-)
*/
#if 0
-static int cb_pcidda_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int cb_pcidda_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
printk("cb_pcidda_ai_cmd\n");
printk("subdev: %d\n", cmd->subdev);
#endif
#if 0
-static int cb_pcidda_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidda_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
}
#endif
-static int cb_pcidda_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidda_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int command;
detach:cb_pcimdas_detach,
};
-static int cb_pcimdas_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcimdas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcimdas_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcimdas_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcimdas_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcimdas_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/*
*/
static int cb_pcimdas_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
struct pci_dev *pcidev;
int index;
//int i;
* "instructions" read/write data in "one-shot" or "software-triggered"
* mode.
*/
-static int cb_pcimdas_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcimdas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i;
return n;
}
-static int cb_pcimdas_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcimdas_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int cb_pcimdas_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int cb_pcimdas_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
MODULE_LICENSE("GPL");
COMEDI_PCI_INITCLEANUP_NOMODULE(cb_pcimdda_driver, pci_table);
-static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/*---------------------------------------------------------------------------
*/
static int attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int err;
/*
return 0;
}
-static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
all AO channels update simultaneously. This is useful for some control
applications, I would imagine.
*/
-static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
.num_names = sizeof(bondingBoards) / sizeof(struct BondingBoard),
};
-static int bonding_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
+static int bonding_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int bonding_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
+static int bonding_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
*/
static int bonding_attach(struct comedi_device *dev, comedi_devconfig *it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
LOG_MSG("comedi%d\n", dev->minor);
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int bonding_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
+static int bonding_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
#define LSAMPL_BITS (sizeof(unsigned int)*8)
return insn->n;
}
-static int bonding_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
+static int bonding_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec), ret, io_bits = s->io_bits;
#include "comedi_fc.h"
-static void increment_scan_progress(comedi_subdevice *subd,
+static void increment_scan_progress(struct comedi_subdevice *subd,
unsigned int num_bytes)
{
comedi_async *async = subd->async;
}
/* Writes an array of data points to comedi's buffer */
-unsigned int cfc_write_array_to_buffer(comedi_subdevice *subd, void *data,
+unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *subd, void *data,
unsigned int num_bytes)
{
comedi_async *async = subd->async;
}
EXPORT_SYMBOL(cfc_write_array_to_buffer);
-unsigned int cfc_read_array_from_buffer(comedi_subdevice *subd, void *data,
+unsigned int cfc_read_array_from_buffer(struct comedi_subdevice *subd, void *data,
unsigned int num_bytes)
{
comedi_async *async = subd->async;
}
EXPORT_SYMBOL(cfc_read_array_from_buffer);
-unsigned int cfc_handle_events(struct comedi_device *dev, comedi_subdevice *subd)
+unsigned int cfc_handle_events(struct comedi_device *dev, struct comedi_subdevice *subd)
{
unsigned int events = subd->async->events;
#include "../comedidev.h"
/* Writes an array of data points to comedi's buffer */
-extern unsigned int cfc_write_array_to_buffer(comedi_subdevice *subd,
+extern unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *subd,
void *data,
unsigned int num_bytes);
-static inline unsigned int cfc_write_to_buffer(comedi_subdevice *subd,
+static inline unsigned int cfc_write_to_buffer(struct comedi_subdevice *subd,
short data)
{
return cfc_write_array_to_buffer(subd, &data, sizeof(data));
};
-static inline unsigned int cfc_write_long_to_buffer(comedi_subdevice *subd,
+static inline unsigned int cfc_write_long_to_buffer(struct comedi_subdevice *subd,
unsigned int data)
{
return cfc_write_array_to_buffer(subd, &data, sizeof(data));
};
-extern unsigned int cfc_read_array_from_buffer(comedi_subdevice *subd,
+extern unsigned int cfc_read_array_from_buffer(struct comedi_subdevice *subd,
void *data,
unsigned int num_bytes);
extern unsigned int cfc_handle_events(struct comedi_device *dev,
- comedi_subdevice *subd);
+ struct comedi_subdevice *subd);
-static inline unsigned int cfc_bytes_per_scan(comedi_subdevice *subd)
+static inline unsigned int cfc_bytes_per_scan(struct comedi_subdevice *subd)
{
int num_samples;
int bits_per_sample;
};
#define devpriv ((struct parport_private *)(dev->private))
-static int parport_insn_a(struct comedi_device *dev, comedi_subdevice *s,
+static int parport_insn_a(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
if (data[0]) {
return 2;
}
-static int parport_insn_config_a(struct comedi_device *dev, comedi_subdevice *s,
+static int parport_insn_config_a(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
if (data[0]) {
return 1;
}
-static int parport_insn_b(struct comedi_device *dev, comedi_subdevice *s,
+static int parport_insn_b(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
if (data[0]) {
return 2;
}
-static int parport_insn_c(struct comedi_device *dev, comedi_subdevice *s,
+static int parport_insn_c(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
data[0] &= 0x0f;
return 2;
}
-static int parport_intr_insn(struct comedi_device *dev, comedi_subdevice *s,
+static int parport_intr_insn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
if (insn->n < 1)
return 2;
}
-static int parport_intr_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
+static int parport_intr_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd)
{
int err = 0;
return 0;
}
-static int parport_intr_cmd(struct comedi_device *dev, comedi_subdevice *s)
+static int parport_intr_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
devpriv->c_data |= 0x10;
outb(devpriv->c_data, dev->iobase + PARPORT_C);
return 0;
}
-static int parport_intr_cancel(struct comedi_device *dev, comedi_subdevice *s)
+static int parport_intr_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
printk(KERN_DEBUG "parport_intr_cancel()\n");
static irqreturn_t parport_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 3;
+ struct comedi_subdevice *s = dev->subdevices + 3;
if (!devpriv->enable_irq) {
printk(KERN_ERR "comedi_parport: bogus irq, ignored\n");
int ret;
unsigned int irq;
unsigned long iobase;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
iobase = it->options[0];
printk(KERN_INFO "comedi%d: parport: 0x%04lx ", dev->minor, iobase);
static int timer_attach(struct comedi_device * dev, comedi_devconfig * it);
static int timer_detach(struct comedi_device * dev);
-static int timer_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int timer_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trig_num);
-static int timer_start_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int timer_start_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static comedi_driver driver_timer = {
module:THIS_MODULE,
} timer_private;
#define devpriv ((timer_private *)dev->private)
-static int timer_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int timer_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
devpriv->stop = 1;
static int timer_data_read(struct comedi_device * dev, comedi_cmd * cmd,
unsigned int index)
{
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
int ret;
unsigned int data;
static int timer_data_write(struct comedi_device * dev, comedi_cmd * cmd,
unsigned int index)
{
- comedi_subdevice *s = dev->write_subdev;
+ struct comedi_subdevice *s = dev->write_subdev;
unsigned int num_bytes;
short data;
unsigned int long_data;
static int timer_dio_read(struct comedi_device * dev, comedi_cmd * cmd,
unsigned int index)
{
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
int ret;
unsigned int data;
static void scan_task_func(comedi_rt_task_context_t d)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
int i, ret;
static void timer_task_func(comedi_rt_task_context_t d)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
comedi_cmd *cmd = &s->async->cmd;
int ret;
unsigned long long n;
}
}
-static int timer_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int timer_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
comedi_insn xinsn = *insn;
return err;
}
-static int timer_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int timer_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int timer_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int timer_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
int ret;
comedi_cmd *cmd = &s->async->cmd;
return 0;
}
-static int timer_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int timer_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trig_num)
{
if (trig_num != 0)
return timer_start_cmd(dev, s);
}
-static int timer_start_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int timer_start_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
static int timer_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
- comedi_subdevice *s, *emul_s;
+ struct comedi_subdevice *s, *emul_s;
struct comedi_device *emul_dev;
/* These should probably be devconfig options[] */
const int timer_priority = 4;
COMEDI_INITCLEANUP(driver_waveform);
-static int waveform_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
+static int waveform_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd);
-static int waveform_ai_cmd(struct comedi_device *dev, comedi_subdevice *s);
-static int waveform_ai_cancel(struct comedi_device *dev, comedi_subdevice *s);
-static int waveform_ai_insn_read(struct comedi_device *dev, comedi_subdevice *s,
+static int waveform_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
+static int waveform_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
+static int waveform_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int waveform_ao_insn_write(struct comedi_device *dev, comedi_subdevice *s,
+static int waveform_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
static short fake_sawtooth(struct comedi_device *dev, unsigned int range,
unsigned long current_time);
static int waveform_attach(struct comedi_device *dev, comedi_devconfig *it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int amplitude = it->options[0];
int period = it->options[1];
int i;
return 0;
}
-static int waveform_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
+static int waveform_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd)
{
int err = 0;
return 0;
}
-static int waveform_ai_cmd(struct comedi_device *dev, comedi_subdevice *s)
+static int waveform_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
comedi_cmd *cmd = &s->async->cmd;
return 0;
}
-static int waveform_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
+static int waveform_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
devpriv->timer_running = 0;
del_timer(&devpriv->timer);
static short fake_sawtooth(struct comedi_device *dev, unsigned int range_index,
unsigned long current_time)
{
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
unsigned int offset = s->maxdata / 2;
u64 value;
const comedi_krange *krange = &s->range_table->range[range_index];
static short fake_squarewave(struct comedi_device *dev, unsigned int range_index,
unsigned long current_time)
{
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
unsigned int offset = s->maxdata / 2;
u64 value;
const comedi_krange *krange = &s->range_table->range[range_index];
return fake_flatline(dev, range, current_time);
}
-static int waveform_ai_insn_read(struct comedi_device *dev, comedi_subdevice *s,
+static int waveform_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i, chan = CR_CHAN(insn->chanspec);
return insn->n;
}
-static int waveform_ao_insn_write(struct comedi_device *dev, comedi_subdevice *s,
+static int waveform_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i, chan = CR_CHAN(insn->chanspec);
};
/* Classic digital IO */
-static int contec_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int contec_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int contec_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int contec_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
#if 0
-static int contec_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int contec_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
static int contec_ns_to_timer(unsigned int *ns, int round);
static int contec_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pci_dev *pcidev;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
printk("comedi%d: contec: ", dev->minor);
}
#if 0
-static int contec_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int contec_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
printk("contec_cmdtest called\n");
}
#endif
-static int contec_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int contec_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
return 2;
}
-static int contec_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int contec_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
writeAcqScanListEntry(dev, word3);
}
-static int daqboard2000_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int daqboard2000_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int daqboard2000_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int daqboard2000_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int daqboard2000_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int daqboard2000_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
static int daqboard2000_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int result = 0;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
struct pci_dev *card = NULL;
void *aux_data;
unsigned int aux_len;
/* gainlist same as _pgx_ below */
-static int das08_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das08_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das08_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das08_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das08_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das08_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das08jr_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das08jr_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das08jr_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das08jr_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das08jr_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das08jr_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das08ao_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das08ao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static void i8254_set_mode_low(unsigned int base, int channel,
unsigned int mode);
#define TIMEOUT 100000
-static int das08_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das08_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
return n;
}
-static int das08_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das08_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = 0;
return 2;
}
-static int das08_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das08_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int wbits;
return 2;
}
-static int das08jr_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das08jr_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = 0;
return 2;
}
-static int das08jr_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das08jr_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
// null bits we are going to set
return 2;
}
-static int das08jr_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das08jr_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
* a different method to force an update.
*
*/
-static int das08ao_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das08ao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
return i8254_read_status_low(st->iobase, chan);
}
-static int das08_counter_read(struct comedi_device * dev, comedi_subdevice * s,
+static int das08_counter_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = insn->chanspec;
return 1;
}
-static int das08_counter_write(struct comedi_device * dev, comedi_subdevice * s,
+static int das08_counter_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = insn->chanspec;
return 1;
}
-static int das08_counter_config(struct comedi_device * dev, comedi_subdevice * s,
+static int das08_counter_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = insn->chanspec;
int das08_common_attach(struct comedi_device * dev, unsigned long iobase)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret;
// allocate ioports for non-pcmcia, non-pci boards
unsigned have_byte:1;
};
-static int das16_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das16_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das16_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das16_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das16_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
+static int das16_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int das16_cmd_exec(struct comedi_device * dev, comedi_subdevice * s);
-static int das16_cancel(struct comedi_device * dev, comedi_subdevice * s);
-static void das16_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
+static int das16_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s);
+static int das16_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
+static void das16_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
void *array, unsigned int num_bytes, unsigned int start_chan_index);
static void das16_reset(struct comedi_device * dev);
#define devpriv ((struct das16_private_struct *)(dev->private))
#define thisboard ((struct das16_board_struct *)(dev->board_ptr))
-static int das16_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
+static int das16_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0, tmp;
return 0;
}
-static int das16_cmd_exec(struct comedi_device * dev, comedi_subdevice * s)
+static int das16_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
return 0;
}
-static int das16_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int das16_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
outb(0, dev->iobase + DAS16_CNTR_CONTROL);
}
-static int das16_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das16_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
return n;
}
-static int das16_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das16_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
return 2;
}
-static int das16_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das16_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int wbits;
return 2;
}
-static int das16_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das16_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
static void das16_interrupt(struct comedi_device * dev)
{
unsigned long dma_flags, spin_flags;
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
comedi_async *async;
comedi_cmd *cmd;
int num_bytes, residue;
static int das16_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret;
unsigned int irq;
unsigned long iobase;
return size;
}
-static void das16_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
+static void das16_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
void *array, unsigned int num_bytes, unsigned int start_chan_index)
{
unsigned int i, num_samples = num_bytes / sizeof(short);
}
};
-static int das16m1_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das16m1_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16m1_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das16m1_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16m1_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das16m1_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16m1_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
+static int das16m1_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int das16m1_cmd_exec(struct comedi_device * dev, comedi_subdevice * s);
-static int das16m1_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s);
+static int das16m1_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
-static int das16m1_poll(struct comedi_device * dev, comedi_subdevice * s);
+static int das16m1_poll(struct comedi_device * dev, struct comedi_subdevice * s);
static irqreturn_t das16m1_interrupt(int irq, void *d PT_REGS_ARG);
static void das16m1_handler(struct comedi_device * dev, unsigned int status);
return (data >> 4) & 0xfff;
}
-static int das16m1_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
+static int das16m1_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
unsigned int err = 0, tmp, i;
return 0;
}
-static int das16m1_cmd_exec(struct comedi_device * dev, comedi_subdevice * s)
+static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
return 0;
}
-static int das16m1_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int das16m1_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
devpriv->control_state &= ~INTE & ~PACER_MASK;
outb(devpriv->control_state, dev->iobase + DAS16M1_INTR_CONTROL);
return 0;
}
-static int das16m1_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das16m1_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
return n;
}
-static int das16m1_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das16m1_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
return 2;
}
-static int das16m1_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das16m1_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int wbits;
return 2;
}
-static int das16m1_poll(struct comedi_device * dev, comedi_subdevice * s)
+static int das16m1_poll(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
unsigned int status;
static void das16m1_handler(struct comedi_device * dev, unsigned int status)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
comedi_async *async;
comedi_cmd *cmd;
u16 num_samples;
static int das16m1_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret;
unsigned int irq;
unsigned long iobase;
static int das1800_attach(struct comedi_device * dev, comedi_devconfig * it);
static int das1800_detach(struct comedi_device * dev);
static int das1800_probe(struct comedi_device * dev);
-static int das1800_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int das1800_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static irqreturn_t das1800_interrupt(int irq, void *d PT_REGS_ARG);
-static int das1800_ai_poll(struct comedi_device * dev, comedi_subdevice * s);
+static int das1800_ai_poll(struct comedi_device * dev, struct comedi_subdevice * s);
static void das1800_ai_handler(struct comedi_device * dev);
-static void das1800_handle_dma(struct comedi_device * dev, comedi_subdevice * s,
+static void das1800_handle_dma(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int status);
-static void das1800_flush_dma(struct comedi_device * dev, comedi_subdevice * s);
-static void das1800_flush_dma_channel(struct comedi_device * dev, comedi_subdevice * s,
+static void das1800_flush_dma(struct comedi_device * dev, struct comedi_subdevice * s);
+static void das1800_flush_dma_channel(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int channel, uint16_t * buffer);
static void das1800_handle_fifo_half_full(struct comedi_device * dev,
- comedi_subdevice * s);
+ struct comedi_subdevice * s);
static void das1800_handle_fifo_not_empty(struct comedi_device * dev,
- comedi_subdevice * s);
-static int das1800_ai_do_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+ struct comedi_subdevice * s);
+static int das1800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int das1800_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int das1800_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das1800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int das1800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das1800_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das1800_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das1800_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das1800_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das1800_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das1800_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int das1800_set_frequency(struct comedi_device * dev);
static int das1800_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase = it->options[0];
unsigned int irq = it->options[1];
unsigned int dma0 = it->options[2];
return -1;
}
-static int das1800_ai_poll(struct comedi_device * dev, comedi_subdevice * s)
+static int das1800_ai_poll(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
// the guts of the interrupt handler, that is shared with das1800_ai_poll
static void das1800_ai_handler(struct comedi_device * dev)
{
- comedi_subdevice *s = dev->subdevices + 0; /* analog input subdevice */
+ struct comedi_subdevice *s = dev->subdevices + 0; /* analog input subdevice */
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
unsigned int status = inb(dev->iobase + DAS1800_STATUS);
return;
}
-static void das1800_handle_dma(struct comedi_device * dev, comedi_subdevice * s,
+static void das1800_handle_dma(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int status)
{
unsigned long flags;
/* Utility function used by das1800_flush_dma() and das1800_handle_dma().
* Assumes dma lock is held */
-static void das1800_flush_dma_channel(struct comedi_device * dev, comedi_subdevice * s,
+static void das1800_flush_dma_channel(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int channel, uint16_t * buffer)
{
unsigned int num_bytes, num_samples;
/* flushes remaining data from board when external trigger has stopped aquisition
* and we are using dma transfers */
-static void das1800_flush_dma(struct comedi_device * dev, comedi_subdevice * s)
+static void das1800_flush_dma(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
const int dual_dma = devpriv->irq_dma_bits & DMA_DUAL;
}
static void das1800_handle_fifo_half_full(struct comedi_device * dev,
- comedi_subdevice * s)
+ struct comedi_subdevice * s)
{
int numPoints = 0; /* number of points to read */
comedi_cmd *cmd = &s->async->cmd;
}
static void das1800_handle_fifo_not_empty(struct comedi_device * dev,
- comedi_subdevice * s)
+ struct comedi_subdevice * s)
{
short dpnt;
int unipolar;
return;
}
-static int das1800_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int das1800_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
outb(0x0, dev->iobase + DAS1800_STATUS); /* disable conversions */
outb(0x0, dev->iobase + DAS1800_CONTROL_B); /* disable interrupts and dma */
}
/* test analog input cmd */
-static int das1800_ai_do_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int das1800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
}
// analog input do_cmd
-static int das1800_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int das1800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
int ret;
int control_a, control_c;
}
/* read analog input */
-static int das1800_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das1800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
}
/* writes to an analog output channel */
-static int das1800_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das1800_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
}
/* reads from digital input channels */
-static int das1800_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das1800_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
}
/* writes to digital output channels */
-static int das1800_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das1800_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int wbits;
} das6402_private;
#define devpriv ((das6402_private *)dev->private)
-static void das6402_ai_fifo_dregs(struct comedi_device * dev, comedi_subdevice * s);
+static void das6402_ai_fifo_dregs(struct comedi_device * dev, struct comedi_subdevice * s);
static void das6402_setcounter(struct comedi_device * dev)
{
static irqreturn_t intr_handler(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices;
+ struct comedi_subdevice *s = dev->subdevices;
if (!dev->attached || devpriv->das6402_ignoreirq) {
printk("das6402: BUG: spurious interrupt\n");
}
#endif
-static void das6402_ai_fifo_dregs(struct comedi_device * dev, comedi_subdevice * s)
+static void das6402_ai_fifo_dregs(struct comedi_device * dev, struct comedi_subdevice * s)
{
while (1) {
if (!(inb(dev->iobase + 8) & 0x01))
}
}
-static int das6402_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int das6402_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
/*
* This function should reset the board from whatever condition it
}
#ifdef unused
-static int das6402_ai_mode2(struct comedi_device * dev, comedi_subdevice * s,
+static int das6402_ai_mode2(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_trig * it)
{
devpriv->das6402_ignoreirq = 1;
unsigned int irq;
unsigned long iobase;
int ret;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
dev->board_name = "das6402";
static int das800_attach(struct comedi_device * dev, comedi_devconfig * it);
static int das800_detach(struct comedi_device * dev);
-static int das800_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int das800_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static comedi_driver driver_das800 = {
driver_name:"das800",
static irqreturn_t das800_interrupt(int irq, void *d PT_REGS_ARG);
static void enable_das800(struct comedi_device * dev);
static void disable_das800(struct comedi_device * dev);
-static int das800_ai_do_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int das800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int das800_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int das800_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int das800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das800_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das800_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das800_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das800_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int das800_probe(struct comedi_device * dev);
static int das800_set_frequency(struct comedi_device * dev);
short i; /* loop index */
short dataPoint = 0;
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->read_subdev; /* analog input subdevice */
+ struct comedi_subdevice *s = dev->read_subdev; /* analog input subdevice */
comedi_async *async;
int status;
unsigned long irq_flags;
static int das800_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase = it->options[0];
unsigned int irq = it->options[1];
unsigned long irq_flags;
return 0;
};
-static int das800_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int das800_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
devpriv->forever = 0;
devpriv->count = 0;
comedi_spin_unlock_irqrestore(&dev->spinlock, irq_flags);
}
-static int das800_ai_do_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int das800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int das800_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int das800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
int startChan, endChan, scan, gain;
int conv_bits;
return 0;
}
-static int das800_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int das800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
return n;
}
-static int das800_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das800_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
return 2;
}
-static int das800_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
+static int das800_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int wbits;
};
/* prototypes for driver functions below */
-static int dmm32at_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dmm32at_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dmm32at_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dmm32at_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dmm32at_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dmm32at_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int dmm32at_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int dmm32at_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int dmm32at_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int dmm32at_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static int dmm32at_ns_to_timer(unsigned int *ns, int round);
static irqreturn_t dmm32at_isr(int irq, void *d PT_REGS_ARG);
void dmm32at_setaitimer(struct comedi_device * dev, unsigned int nansec);
static int dmm32at_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned char aihi, ailo, fifostat, aistat, intstat, airback;
unsigned long iobase;
unsigned int irq;
* mode.
*/
-static int dmm32at_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i;
return n;
}
-static int dmm32at_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int dmm32at_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int dmm32at_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int i, range;
}
-static int dmm32at_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int dmm32at_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
devpriv->ai_scans_left = 1;
return 0;
intstat = dmm_inb(dev, DMM32AT_INTCLOCK);
if (intstat & DMM32AT_ADINT) {
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
comedi_cmd *cmd = &s->async->cmd;
for (i = 0; i < cmd->chanlist_len; i++) {
return *ns;
}
-static int dmm32at_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int dmm32at_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int dmm32at_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned char diobits;
return 2;
}
-static int dmm32at_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned char chanbit;
} dt2801_private;
#define devpriv ((dt2801_private *)dev->private)
-static int dt2801_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2801_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2801_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2801_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2801_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2801_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2801_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2801_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2801_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2801_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/* These are the low-level routines:
*/
static int dt2801_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
int board_code, type;
int ret = 0;
return -EIO;
}
-static int dt2801_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2801_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int d;
return i;
}
-static int dt2801_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2801_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao_readback[CR_CHAN(insn->chanspec)];
return 1;
}
-static int dt2801_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2801_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
dt2801_writecmd(dev, DT_C_WRITE_DAIM);
return 1;
}
-static int dt2801_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2801_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int which = 0;
return 2;
}
-static int dt2801_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2801_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int which = 0;
COMEDI_INITCLEANUP(driver_dt2811);
-static int dt2811_ai_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2811_ai_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2811_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2811_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2811_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2811_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2811_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2811_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2811_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2811_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
enum { card_2811_pgh, card_2811_pgl };
//unsigned long irqs;
//long flags;
int ret;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
iobase = it->options[0];
return 0;
}
-static int dt2811_ai_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2811_ai_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
}
#endif
-static int dt2811_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2811_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int dt2811_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2811_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int dt2811_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2811_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int dt2811_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2811_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
#define DT2814_TIMEOUT 10
#define DT2814_MAX_SPEED 100000 /* Arbitrary 10 khz limit */
-static int dt2814_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2814_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i, hi, lo;
return i;
}
-static int dt2814_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2814_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int dt2814_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int dt2814_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int chan;
{
int i, irq;
int ret;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
iobase = it->options[0];
{
int lo, hi;
struct comedi_device *dev = d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int data;
if (!dev->attached) {
return status;
}
-static int dt2815_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2815_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int dt2815_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2815_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
static int dt2815_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int i;
const comedi_lrange *current_range_type, *voltage_range_type;
unsigned long iobase;
COMEDI_INITCLEANUP(driver_dt2817);
-static int dt2817_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2817_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int mask;
return 1;
}
-static int dt2817_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int dt2817_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int changed;
static int dt2817_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
iobase = it->options[0];
static void free_resources(struct comedi_device * dev);
static int prep_ai_dma(struct comedi_device * dev, int chan, int size);
static int prep_ao_dma(struct comedi_device * dev, int chan, int size);
-static int dt282x_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
-static int dt282x_ao_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int dt282x_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
+static int dt282x_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static int dt282x_ns_to_timer(int *nanosec, int round_mode);
static void dt282x_disable_dma(struct comedi_device * dev);
void *ptr;
int size;
int i;
- comedi_subdevice *s = dev->subdevices + 1;
+ struct comedi_subdevice *s = dev->subdevices + 1;
update_supcsr(DT2821_CLRDMADNE);
int size;
int i;
int ret;
- comedi_subdevice *s = dev->subdevices;
+ struct comedi_subdevice *s = dev->subdevices;
update_supcsr(DT2821_CLRDMADNE);
static irqreturn_t dt282x_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s;
- comedi_subdevice *s_ao;
+ struct comedi_subdevice *s;
+ struct comedi_subdevice *s_ao;
unsigned int supcsr, adcsr, dacsr;
int handled = 0;
* - preload multiplexer
* - trigger conversion and wait for it to finish
*/
-static int dt282x_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int dt282x_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int dt282x_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int dt282x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int dt282x_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int dt282x_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int timer;
}
}
-static int dt282x_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int dt282x_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
dt282x_disable_dma(dev);
* offset binary if necessary, loads the data into the DAC
* data register, and performs the conversion.
*/
-static int dt282x_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int dt282x_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao[CR_CHAN(insn->chanspec)];
return 1;
}
-static int dt282x_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int dt282x_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
short d;
return 1;
}
-static int dt282x_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int dt282x_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
}
-static int dt282x_ao_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int dt282x_ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int x)
{
int size;
return 1;
}
-static int dt282x_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int dt282x_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
int timer;
comedi_cmd *cmd = &s->async->cmd;
return 0;
}
-static int dt282x_ao_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int dt282x_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
dt282x_disable_dma(dev);
return 0;
}
-static int dt282x_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int dt282x_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
return 2;
}
-static int dt282x_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int dt282x_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int mask;
{
int i, irq;
int ret;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
dev->board_name = this_board->name;
COMEDI_PCI_INITCLEANUP(driver_dt3000, dt3k_pci_table);
-static void dt3k_ai_empty_fifo(struct comedi_device * dev, comedi_subdevice * s);
+static void dt3k_ai_empty_fifo(struct comedi_device * dev, struct comedi_subdevice * s);
static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *arg,
unsigned int round_mode);
-static int dt3k_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int dt3k_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
#ifdef DEBUG
static void debug_intr_flags(unsigned int flags);
#endif
static irqreturn_t dt3k_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned int status;
if (!dev->attached) {
}
#endif
-static void dt3k_ai_empty_fifo(struct comedi_device * dev, comedi_subdevice * s)
+static void dt3k_ai_empty_fifo(struct comedi_device * dev, struct comedi_subdevice * s)
{
int front;
int rear;
writew(rear, devpriv->io_addr + DPR_AD_Buf_Rear);
}
-static int dt3k_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int dt3k_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return (prescale << 16) | (divider);
}
-static int dt3k_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int dt3k_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int i;
return 0;
}
-static int dt3k_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int dt3k_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
int ret;
return 0;
}
-static int dt3k_ai_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dt3k_ai_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int dt3k_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dt3k_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int dt3k_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int dt3k_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
dt3k_send_cmd(dev, CMD_CONFIG);
}
-static int dt3k_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int dt3k_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int mask;
return insn->n;
}
-static int dt3k_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int dt3k_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int dt3k_mem_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int dt3k_mem_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int addr = CR_CHAN(insn->chanspec);
static int dt3000_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int bus, slot;
int ret = 0;
down(&devpriv->slot->mutex);
if (devpriv->slot->usb) {
/* We have an attached device, fill in current range info */
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
s = &dev->subdevices[0];
s->n_chan = 8;
up(&devpriv->slot->mutex);
}
-static int dt9812_di_rinsn(struct comedi_device *dev, comedi_subdevice *s,
+static int dt9812_di_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n;
return n;
}
-static int dt9812_do_winsn(struct comedi_device *dev, comedi_subdevice *s,
+static int dt9812_do_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n;
return n;
}
-static int dt9812_ai_rinsn(struct comedi_device *dev, comedi_subdevice *s,
+static int dt9812_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n;
return n;
}
-static int dt9812_ao_rinsn(struct comedi_device *dev, comedi_subdevice *s,
+static int dt9812_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n;
return n;
}
-static int dt9812_ao_winsn(struct comedi_device *dev, comedi_subdevice *s,
+static int dt9812_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n;
static int dt9812_attach(struct comedi_device *dev, comedi_devconfig *it)
{
int i;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
dev->board_name = "dt9812";
COMEDI_INITCLEANUP(driver_fl512);
static int fl512_ai_insn(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
static int fl512_ao_insn(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
static int fl512_ao_insn_readback(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
/*
* fl512_ai_insn : this is the analog input function
*/
static int fl512_ai_insn(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int n;
unsigned int lo_byte, hi_byte;
* fl512_ao_insn : used to write to a DA port n times
*/
static int fl512_ao_insn(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int n;
int chan = CR_CHAN(insn->chanspec); /* get chan to write */
* DA port
*/
static int fl512_ao_insn_readback(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int n;
int chan = CR_CHAN(insn->chanspec);
static int fl512_attach(struct comedi_device * dev, comedi_devconfig * it)
{
unsigned long iobase;
- comedi_subdevice *s; /* pointer to the subdevice:
+ struct comedi_subdevice *s; /* pointer to the subdevice:
Analog in, Analog out, ( not made ->and Digital IO) */
iobase = it->options[0];
static int hpdi_attach(struct comedi_device * dev, comedi_devconfig * it);
static int hpdi_detach(struct comedi_device * dev);
void abort_dma(struct comedi_device * dev, unsigned int channel);
-static int hpdi_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int hpdi_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
+static int hpdi_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int hpdi_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int hpdi_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int hpdi_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG);
static int dio_config_block_size(struct comedi_device * dev, unsigned int * data);
COMEDI_PCI_INITCLEANUP(driver_hpdi, hpdi_pci_table);
-static int dio_config_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int dio_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
*/
static int setup_subdevices(struct comedi_device * dev)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
if (alloc_subdevices(dev, 1) < 0)
return -ENOMEM;
return 2;
}
-static int di_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
+static int di_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int hpdi_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
+static int hpdi_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
if (priv(dev)->dio_config_output) {
priv(dev)->hpdi_iobase + offset);
}
-static int di_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int di_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
uint32_t bits;
unsigned long flags;
return 0;
}
-static int hpdi_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int hpdi_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
if (priv(dev)->dio_config_output) {
return -EINVAL;
static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
comedi_async *async = s->async;
uint32_t hpdi_intr_status, hpdi_board_status;
uint32_t plx_status;
comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
}
-static int hpdi_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int hpdi_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
hpdi_writel(dev, 0, BOARD_CONTROL_REG);
*/
#if 0
-static int check_channel_list(struct comedi_device *dev, comedi_subdevice *s,
+static int check_channel_list(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan);
#endif
-static void setup_channel_list(struct comedi_device *dev, comedi_subdevice *s,
+static void setup_channel_list(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan);
static int icp_multi_reset(struct comedi_device *dev);
Parameters:
struct comedi_device *dev Pointer to current device structure
- comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue input data
==============================================================================
*/
-static int icp_multi_insn_read_ai(struct comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_read_ai(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n, timeout;
Parameters:
struct comedi_device *dev Pointer to current device structure
- comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue output data
==============================================================================
*/
-static int icp_multi_insn_write_ao(struct comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_write_ao(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n, chan, range, timeout;
Parameters:
struct comedi_device *dev Pointer to current device structure
- comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue output data
==============================================================================
*/
-static int icp_multi_insn_read_ao(struct comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_read_ao(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n, chan;
Parameters:
struct comedi_device *dev Pointer to current device structure
- comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue output data
==============================================================================
*/
-static int icp_multi_insn_bits_di(struct comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_bits_di(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
data[1] = readw(devpriv->io_addr + ICP_MULTI_DI);
Parameters:
struct comedi_device *dev Pointer to current device structure
- comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue output data
==============================================================================
*/
-static int icp_multi_insn_bits_do(struct comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_bits_do(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
#ifdef ICP_MULTI_EXTDEBUG
Parameters:
struct comedi_device *dev Pointer to current device structure
- comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to counter data
==============================================================================
*/
-static int icp_multi_insn_read_ctr(struct comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_read_ctr(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
return 0;
Parameters:
struct comedi_device *dev Pointer to current device structure
- comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to counter data
==============================================================================
*/
-static int icp_multi_insn_write_ctr(struct comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_write_ctr(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
return 0;
Parameters:
struct comedi_device *dev Pointer to current sevice structure
- comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
unsigned int *chanlist Pointer to packed channel list
unsigned int n_chan Number of channels to scan
==============================================================================
*/
-static int check_channel_list(struct comedi_device *dev, comedi_subdevice *s,
+static int check_channel_list(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan)
{
unsigned int i;
Parameters:
struct comedi_device *dev Pointer to current sevice structure
- comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
unsigned int *chanlist Pointer to packed channel list
unsigned int n_chan Number of channels to scan
==============================================================================
*/
-static void setup_channel_list(struct comedi_device *dev, comedi_subdevice *s,
+static void setup_channel_list(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan)
{
unsigned int i, range, chanprog;
*/
static int icp_multi_attach(struct comedi_device *dev, comedi_devconfig *it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret, subdev, n_subdevices;
unsigned int irq;
struct pcilst_struct *card = NULL;
detach:pci20xxx_detach,
};
-static int pci20006_init(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20006_init(struct comedi_device * dev, struct comedi_subdevice * s,
int opt0, int opt1);
-static int pci20341_init(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20341_init(struct comedi_device * dev, struct comedi_subdevice * s,
int opt0, int opt1);
-static int pci20xxx_dio_init(struct comedi_device * dev, comedi_subdevice * s);
+static int pci20xxx_dio_init(struct comedi_device * dev, struct comedi_subdevice * s);
/*
options[0] Board base address
unsigned char i;
int ret;
int id;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
pci20xxx_subdev_private *sdp;
if ((ret = alloc_subdevices(dev, 1 + PCI20000_MODULES)) < 0)
/* pci20006m */
-static int pci20006_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20006_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pci20006_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20006_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static const comedi_lrange *pci20006_range_list[] = {
&range_bipolar5,
};
-static int pci20006_init(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20006_init(struct comedi_device * dev, struct comedi_subdevice * s,
int opt0, int opt1)
{
pci20xxx_subdev_private *sdp = s->private;
return 0;
}
-static int pci20006_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20006_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
pci20xxx_subdev_private *sdp = s->private;
return 1;
}
-static int pci20006_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20006_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
pci20xxx_subdev_private *sdp = s->private;
/* PCI20341M */
-static int pci20341_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20341_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static const int pci20341_timebase[] = { 0x00, 0x00, 0x00, 0x04 };
&range_bipolar0_025,
};
-static int pci20341_init(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20341_init(struct comedi_device * dev, struct comedi_subdevice * s,
int opt0, int opt1)
{
pci20xxx_subdev_private *sdp = s->private;
return 0;
}
-static int pci20341_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20341_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
pci20xxx_subdev_private *sdp = s->private;
/* native DIO */
-static void pci20xxx_dio_config(struct comedi_device * dev, comedi_subdevice * s);
-static int pci20xxx_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static void pci20xxx_dio_config(struct comedi_device * dev, struct comedi_subdevice * s);
+static int pci20xxx_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pci20xxx_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20xxx_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/* initialize pci20xxx_private */
-static int pci20xxx_dio_init(struct comedi_device * dev, comedi_subdevice * s)
+static int pci20xxx_dio_init(struct comedi_device * dev, struct comedi_subdevice * s)
{
s->type = COMEDI_SUBD_DIO;
return 0;
}
-static int pci20xxx_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20xxx_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int mask, bits;
return 1;
}
-static int pci20xxx_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pci20xxx_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int mask = data[0];
return 2;
}
-static void pci20xxx_dio_config(struct comedi_device * dev, comedi_subdevice * s)
+static void pci20xxx_dio_config(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned char control_01;
unsigned char control_23;
}
#if 0
-static void pci20xxx_do(struct comedi_device * dev, comedi_subdevice * s)
+static void pci20xxx_do(struct comedi_device * dev, struct comedi_subdevice * s)
{
/* XXX if the channel is configured for input, does this
do bad things? */
writeb((s->state >> 24) & 0xff, devpriv->ioaddr + PCI20000_DIO_3);
}
-static unsigned int pci20xxx_di(struct comedi_device * dev, comedi_subdevice * s)
+static unsigned int pci20xxx_di(struct comedi_device * dev, struct comedi_subdevice * s)
{
/* XXX same note as above */
unsigned int bits;
return result;
}
-static int jr3_pci_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int jr3_pci_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int result;
return result;
}
-static poll_delay_t jr3_pci_poll_subdevice(comedi_subdevice * s)
+static poll_delay_t jr3_pci_poll_subdevice(struct comedi_subdevice * s)
{
poll_delay_t result = poll_delay_min_max(1000, 2000);
jr3_pci_subdev_private *p = s->private;
/* This should be used only for resetting the counters; maybe it is better
to make a special command 'reset'. */
static int cnt_winsn(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
/*-- counter read -----------------------------------------------------------*/
static int cnt_rinsn(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
unsigned char a0, a1, a2, a3, a4;
int chan = CR_CHAN(insn->chanspec);
static int cnt_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *subdevice;
+ struct comedi_subdevice *subdevice;
struct pci_dev *pci_device;
cnt_board_struct *board;
unsigned long io_base;
static int reset_board(struct comedi_device *dev);
static int me4000_dio_insn_bits(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
static int me4000_dio_insn_config(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
static int cnt_reset(struct comedi_device *dev, unsigned int channel);
unsigned int channel, unsigned int mode);
static int me4000_cnt_insn_config(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
static int me4000_cnt_insn_write(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
static int me4000_cnt_insn_read(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
static int me4000_ai_insn_read(struct comedi_device *dev,
- comedi_subdevice *subdevice, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *subdevice, comedi_insn *insn, unsigned int *data);
-static int me4000_ai_cancel(struct comedi_device *dev, comedi_subdevice *s);
+static int me4000_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
static int ai_check_chanlist(struct comedi_device *dev,
- comedi_subdevice *s, comedi_cmd *cmd);
+ struct comedi_subdevice *s, comedi_cmd *cmd);
static int ai_round_cmd_args(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_cmd *cmd,
unsigned int *init_ticks,
unsigned int *scan_ticks, unsigned int *chan_ticks);
static int ai_prepare(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_cmd *cmd,
unsigned int init_ticks,
unsigned int scan_ticks, unsigned int chan_ticks);
static int ai_write_chanlist(struct comedi_device *dev,
- comedi_subdevice *s, comedi_cmd *cmd);
+ struct comedi_subdevice *s, comedi_cmd *cmd);
static irqreturn_t me4000_ai_isr(int irq, void *dev_id PT_REGS_ARG);
static int me4000_ai_do_cmd_test(struct comedi_device *dev,
- comedi_subdevice *s, comedi_cmd *cmd);
+ struct comedi_subdevice *s, comedi_cmd *cmd);
-static int me4000_ai_do_cmd(struct comedi_device *dev, comedi_subdevice *s);
+static int me4000_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
static int me4000_ao_insn_write(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
static int me4000_ao_insn_read(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
/*-----------------------------------------------------------------------------
Meilhaus inline functions
static int me4000_attach(struct comedi_device *dev, comedi_devconfig *it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int result;
CALL_PDEBUG("In me4000_attach()\n");
===========================================================================*/
static int me4000_ai_insn_read(struct comedi_device *dev,
- comedi_subdevice *subdevice, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *subdevice, comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
return 1;
}
-static int me4000_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
+static int me4000_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
unsigned long tmp;
}
static int ai_check_chanlist(struct comedi_device *dev,
- comedi_subdevice *s, comedi_cmd *cmd)
+ struct comedi_subdevice *s, comedi_cmd *cmd)
{
int aref;
int i;
}
static int ai_round_cmd_args(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_cmd *cmd,
unsigned int *init_ticks,
unsigned int *scan_ticks, unsigned int *chan_ticks)
}
static int ai_prepare(struct comedi_device *dev,
- comedi_subdevice *s,
+ struct comedi_subdevice *s,
comedi_cmd *cmd,
unsigned int init_ticks,
unsigned int scan_ticks, unsigned int chan_ticks)
}
static int ai_write_chanlist(struct comedi_device *dev,
- comedi_subdevice *s, comedi_cmd *cmd)
+ struct comedi_subdevice *s, comedi_cmd *cmd)
{
unsigned int entry;
unsigned int chan;
return 0;
}
-static int me4000_ai_do_cmd(struct comedi_device *dev, comedi_subdevice *s)
+static int me4000_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
int err;
unsigned int init_ticks = 0;
* So I tried to adopt this scheme.
*/
static int me4000_ai_do_cmd_test(struct comedi_device *dev,
- comedi_subdevice *s, comedi_cmd *cmd)
+ struct comedi_subdevice *s, comedi_cmd *cmd)
{
unsigned int init_ticks;
{
unsigned int tmp;
struct comedi_device *dev = dev_id;
- comedi_subdevice *s = dev->subdevices;
+ struct comedi_subdevice *s = dev->subdevices;
me4000_ai_context_t *ai_context = &info->ai_context;
int i;
int c = 0;
===========================================================================*/
static int me4000_ao_insn_write(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
}
static int me4000_ao_insn_read(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
===========================================================================*/
static int me4000_dio_insn_bits(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
CALL_PDEBUG("In me4000_dio_insn_bits()\n");
}
static int me4000_dio_insn_config(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
unsigned long tmp;
int chan = CR_CHAN(insn->chanspec);
}
static int me4000_cnt_insn_config(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int err;
}
static int me4000_cnt_insn_read(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
unsigned short tmp;
}
static int me4000_cnt_insn_write(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
unsigned short tmp;
*
* ------------------------------------------------------------------
*/
-static int me_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
+static int me_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int bits;
}
/* Digital instant input/outputs */
-static int me_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
+static int me_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
unsigned int mask = data[0];
*/
/* Analog instant input */
-static int me_ai_insn_read(struct comedi_device *dev, comedi_subdevice *subdevice,
+static int me_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *subdevice,
comedi_insn *insn, unsigned int *data)
{
unsigned short value;
*/
/* Cancel analog input autoscan */
-static int me_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
+static int me_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
/* disable interrupts */
}
/* Test analog input command */
-static int me_ai_do_cmd_test(struct comedi_device *dev, comedi_subdevice *s,
+static int me_ai_do_cmd_test(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd)
{
return 0;
}
/* Analog input command */
-static int me_ai_do_cmd(struct comedi_device *dev, comedi_subdevice *subdevice)
+static int me_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *subdevice)
{
return 0;
}
*/
/* Analog instant output */
-static int me_ao_insn_write(struct comedi_device *dev, comedi_subdevice *s,
+static int me_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int chan;
}
/* Analog output readback */
-static int me_ao_insn_read(struct comedi_device *dev, comedi_subdevice *s,
+static int me_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i;
static int me_attach(struct comedi_device *dev, comedi_devconfig *it)
{
struct pci_dev *pci_device;
- comedi_subdevice *subdevice;
+ struct comedi_subdevice *subdevice;
struct me_board *board;
resource_size_t plx_regbase_tmp;
unsigned long plx_regbase_size_tmp;
};
//----------------------------------------------------------------------------
-static int mpc624_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int mpc624_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
//----------------------------------------------------------------------------
static int mpc624_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
iobase = it->options[0];
// Timeout 200ms
#define TIMEOUT 200
-static int mpc624_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int mpc624_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i;
COMEDI_INITCLEANUP(driver_mpc8260cpm);
-static int mpc8260cpm_dio_config(struct comedi_device * dev, comedi_subdevice * s,
+static int mpc8260cpm_dio_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int mpc8260cpm_dio_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int mpc8260cpm_dio_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int mpc8260cpm_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int i;
printk("comedi%d: mpc8260cpm: ", dev->minor);
}
}
-static int mpc8260cpm_dio_config(struct comedi_device * dev, comedi_subdevice * s,
+static int mpc8260cpm_dio_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
return 1;
}
-static int mpc8260cpm_dio_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int mpc8260cpm_dio_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int port;
};
#define devpriv ((struct multiq3_private *)dev->private)
-static int multiq3_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int multiq3_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
return n;
}
-static int multiq3_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int multiq3_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int multiq3_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int multiq3_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int multiq3_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int multiq3_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int multiq3_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int multiq3_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int multiq3_encoder_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int multiq3_encoder_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
int result = 0;
unsigned long iobase;
unsigned int irq;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
iobase = it->options[0];
printk("comedi%d: multiq3: 0x%04lx ", dev->minor, iobase);
static int ni6527_find_device(struct comedi_device * dev, int bus, int slot);
-static int ni6527_di_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni6527_di_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
return 2;
}
-static int ni6527_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni6527_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int ni6527_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni6527_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
static irqreturn_t ni6527_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 2;
+ struct comedi_subdevice *s = dev->subdevices + 2;
unsigned int status;
status = readb(devpriv->mite->daq_io_addr + Change_Status);
return IRQ_HANDLED;
}
-static int ni6527_intr_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ni6527_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int ni6527_intr_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int ni6527_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
//comedi_cmd *cmd = &s->async->cmd;
return 0;
}
-static int ni6527_intr_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int ni6527_intr_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
writeb(0x00, devpriv->mite->daq_io_addr + Master_Interrupt_Control);
return 0;
}
-static int ni6527_intr_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni6527_intr_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
return 2;
}
-static int ni6527_intr_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni6527_intr_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
static int ni6527_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret;
printk("comedi%d: ni6527:", dev->minor);
typedef struct {
unsigned base_port;
} ni_65xx_subdevice_private;
-static inline ni_65xx_subdevice_private *sprivate(comedi_subdevice * subdev)
+static inline ni_65xx_subdevice_private *sprivate(struct comedi_subdevice * subdev)
{
return subdev->private;
}
static int ni_65xx_find_device(struct comedi_device * dev, int bus, int slot);
-static int ni_65xx_config_filter(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_65xx_config_filter(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
const unsigned chan = CR_CHAN(insn->chanspec);
return 2;
}
-static int ni_65xx_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_65xx_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned port;
return -EINVAL;
}
-static int ni_65xx_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_65xx_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned base_bitfield_channel;
static irqreturn_t ni_65xx_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 2;
+ struct comedi_subdevice *s = dev->subdevices + 2;
unsigned int status;
status = readb(private(dev)->mite->daq_io_addr + Change_Status);
return IRQ_HANDLED;
}
-static int ni_65xx_intr_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_65xx_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int ni_65xx_intr_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_65xx_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
//comedi_cmd *cmd = &s->async->cmd;
return 0;
}
-static int ni_65xx_intr_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_65xx_intr_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
writeb(0x00,
private(dev)->mite->daq_io_addr + Master_Interrupt_Control);
return 0;
}
-static int ni_65xx_intr_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_65xx_intr_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
return 2;
}
-static int ni_65xx_intr_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_65xx_intr_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
static int ni_65xx_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned i;
int ret;
/* Possible instructions for a GPCT */
static int ni_660x_GPCT_rinsn(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
static int ni_660x_GPCT_insn_config(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
static int ni_660x_GPCT_winsn(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
/* Possible instructions for Digital IO */
static int ni_660x_dio_insn_config(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
static int ni_660x_dio_insn_bits(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
static inline unsigned ni_660x_num_counters(struct comedi_device * dev)
{
comedi_spin_unlock_irqrestore(&private(dev)->mite_channel_lock, flags);
}
-static int ni_660x_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_660x_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
int retval;
return retval;
}
-static int ni_660x_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_660x_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
struct ni_gpct *counter = subdev_to_counter(s);
return ni_tio_cmdtest(counter, cmd);
}
-static int ni_660x_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_660x_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
struct ni_gpct *counter = subdev_to_counter(s);
int retval;
}
static void ni_660x_handle_gpct_interrupt(struct comedi_device * dev,
- comedi_subdevice * s)
+ struct comedi_subdevice * s)
{
ni_tio_handle_interrupt(subdev_to_counter(s), s);
if (s->async->events) {
static irqreturn_t ni_660x_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned i;
if (dev->attached == 0)
return IRQ_HANDLED;
}
-static int ni_660x_buf_change(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_660x_buf_change(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long new_size)
{
int ret;
static int ni_660x_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret;
unsigned i;
unsigned global_interrupt_config_bits;
}
static int
-ni_660x_GPCT_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+ni_660x_GPCT_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
return ni_tio_rinsn(subdev_to_counter(s), insn, data);
}
static int
-ni_660x_GPCT_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+ni_660x_GPCT_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
return ni_tio_insn_config(subdev_to_counter(s), insn, data);
}
static int ni_660x_GPCT_winsn(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
return ni_tio_winsn(subdev_to_counter(s), insn, data);
}
}
static int ni_660x_dio_insn_bits(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
unsigned base_bitfield_channel = CR_CHAN(insn->chanspec);
}
static int ni_660x_dio_insn_config(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
static int ni_670x_find_device(struct comedi_device * dev, int bus, int slot);
-static int ni_670x_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_670x_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_670x_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_670x_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int ni_670x_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret;
int i;
return 0;
}
-static int ni_670x_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int ni_670x_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int ni_670x_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int ni_670x_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
static int a2150_attach(struct comedi_device * dev, comedi_devconfig * it);
static int a2150_detach(struct comedi_device * dev);
-static int a2150_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int a2150_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static comedi_driver driver_a2150 = {
driver_name:"ni_at_a2150",
};
static irqreturn_t a2150_interrupt(int irq, void *d PT_REGS_ARG);
-static int a2150_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int a2150_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int a2150_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int a2150_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int a2150_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int a2150_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int a2150_get_timing(struct comedi_device * dev, unsigned int *period,
int flags);
int status;
unsigned long flags;
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
comedi_async *async;
comedi_cmd *cmd;
unsigned int max_points, num_points, residue, leftover;
static int a2150_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase = it->options[0];
unsigned int irq = it->options[1];
unsigned int dma = it->options[2];
return 0;
};
-static int a2150_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int a2150_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
// disable dma on card
devpriv->irq_dma_bits &= ~DMA_INTR_EN_BIT & ~DMA_EN_BIT;
return 0;
}
-static int a2150_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int a2150_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int a2150_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int a2150_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
return 0;
}
-static int a2150_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int a2150_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int i, n;
static void atao_reset(struct comedi_device * dev);
-static int atao_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int atao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int atao_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int atao_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int atao_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int atao_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int atao_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int atao_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int atao_calib_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int atao_calib_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int atao_calib_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int atao_calib_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int atao_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
int ao_unipolar;
outw(devpriv->cfg1, dev->iobase + ATAO_CFG1);
}
-static int atao_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int atao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int atao_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int atao_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int atao_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int atao_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int atao_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int atao_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
* DACs. It is not explicitly stated in the manual how to access
* the caldacs, but we can guess.
*/
-static int atao_calib_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int atao_calib_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return insn->n;
}
-static int atao_calib_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int atao_calib_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int bitstring, bit;
static int atmio16d_attach(struct comedi_device * dev, comedi_devconfig * it);
static int atmio16d_detach(struct comedi_device * dev);
static irqreturn_t atmio16d_interrupt(int irq, void *d PT_REGS_ARG);
-static int atmio16d_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int atmio16d_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int atmio16d_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int atmio16d_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int atmio16d_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static void reset_counters(struct comedi_device * dev);
static void reset_atmio16d(struct comedi_device * dev);
static irqreturn_t atmio16d_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
// printk("atmio16d_interrupt!\n");
return IRQ_HANDLED;
}
-static int atmio16d_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0, tmp;
return 0;
}
-static int atmio16d_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int atmio16d_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int timer, base_clock;
}
/* This will cancel a running acquisition operation */
-static int atmio16d_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int atmio16d_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
reset_atmio16d(dev);
}
/* Mode 0 is used to get a single conversion on demand */
-static int atmio16d_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, t;
return i;
}
-static int atmio16d_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int atmio16d_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int atmio16d_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int atmio16d_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
unsigned long iobase;
int ret;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
/* make sure the address range is free and allocate it */
iobase = it->options[0];
#define CALLBACK_FUNC (((struct subdev_700_struct *)s->private)->cb_func)
#define subdevpriv ((struct subdev_700_struct *)s->private)
-static void do_config(struct comedi_device * dev, comedi_subdevice * s);
+static void do_config(struct comedi_device * dev, struct comedi_subdevice * s);
-void subdev_700_interrupt(struct comedi_device * dev, comedi_subdevice * s)
+void subdev_700_interrupt(struct comedi_device * dev, struct comedi_subdevice * s)
{
short d;
}
}
-static int subdev_700_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int subdev_700_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
return 2;
}
-static int subdev_700_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int subdev_700_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
return 1;
}
-static void do_config(struct comedi_device * dev, comedi_subdevice * s)
+static void do_config(struct comedi_device * dev, struct comedi_subdevice * s)
{ /* use powerup defaults */
return;
}
-static int subdev_700_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int subdev_700_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int subdev_700_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int subdev_700_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
/* FIXME */
return 0;
}
-static int subdev_700_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int subdev_700_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
/* FIXME */
return 0;
}
-int subdev_700_init(struct comedi_device * dev, comedi_subdevice * s, int (*cb) (int,
+int subdev_700_init(struct comedi_device * dev, struct comedi_subdevice * s, int (*cb) (int,
int, int, unsigned long), unsigned long arg)
{
s->type = COMEDI_SUBD_DIO;
return 0;
}
-int subdev_700_init_irq(struct comedi_device * dev, comedi_subdevice * s,
+int subdev_700_init_irq(struct comedi_device * dev, struct comedi_subdevice * s,
int (*cb) (int, int, int, unsigned long), unsigned long arg)
{
int ret;
return 0;
}
-void subdev_700_cleanup(struct comedi_device * dev, comedi_subdevice * s)
+void subdev_700_cleanup(struct comedi_device * dev, struct comedi_subdevice * s)
{
if (s->private) {
if (subdevpriv->have_irq) {
static int dio700_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase = 0;
#ifdef incomplete
unsigned int irq = 0;
static int dio24_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase = 0;
#ifdef incomplete
unsigned int irq = 0;
#define COUNTER_B_BASE_REG 0x18
static int labpc_attach(struct comedi_device * dev, comedi_devconfig * it);
-static int labpc_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int labpc_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static irqreturn_t labpc_interrupt(int irq, void *d PT_REGS_ARG);
static int labpc_drain_fifo(struct comedi_device * dev);
static void labpc_drain_dma(struct comedi_device * dev);
static void handle_isa_dma(struct comedi_device * dev);
static void labpc_drain_dregs(struct comedi_device * dev);
-static int labpc_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int labpc_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int labpc_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int labpc_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int labpc_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int labpc_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int labpc_calib_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_calib_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int labpc_calib_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_calib_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int labpc_eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int labpc_eeprom_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_eeprom_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static unsigned int labpc_suggest_transfer_size(comedi_cmd cmd);
static void labpc_adc_timing(struct comedi_device * dev, comedi_cmd * cmd);
int labpc_common_attach(struct comedi_device * dev, unsigned long iobase,
unsigned int irq, unsigned int dma_chan)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int i;
unsigned long dma_flags, isr_flags;
short lsb, msb;
devpriv->read_byte(dev->iobase + ADC_FIFO_REG);
}
-static int labpc_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int labpc_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
cmd->scan_begin_arg = ns;
}
-static int labpc_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int labpc_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int labpc_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
int channel, range, aref;
unsigned long irq_flags;
static irqreturn_t labpc_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
comedi_async *async;
comedi_cmd *cmd;
static void labpc_drain_dma(struct comedi_device * dev)
{
- comedi_subdevice *s = dev->read_subdev;
+ struct comedi_subdevice *s = dev->read_subdev;
comedi_async *async = s->async;
int status;
unsigned long flags;
labpc_drain_fifo(dev);
}
-static int labpc_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
}
// analog output insn
-static int labpc_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel, range;
}
// analog output readback insn
-static int labpc_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao_value[CR_CHAN(insn->chanspec)];
return 1;
}
-static int labpc_calib_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_calib_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->caldac[CR_CHAN(insn->chanspec)];
return 1;
}
-static int labpc_calib_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_calib_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel = CR_CHAN(insn->chanspec);
return 1;
}
-static int labpc_eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->eeprom_data[CR_CHAN(insn->chanspec)];
return 1;
}
-static int labpc_eeprom_write_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int labpc_eeprom_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel = CR_CHAN(insn->chanspec);
[ai_gain_6143] = &range_ni_S_ai_6143
};
-static int ni_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_cdio_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_cdio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int ni_cdio_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int ni_cdio_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int ni_cdio_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int ni_cdio_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static void handle_cdio_interrupt(struct comedi_device * dev);
-static int ni_cdo_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_cdo_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum);
-static int ni_serial_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_serial_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_serial_hw_readwrite8(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_serial_hw_readwrite8(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned char data_out, unsigned char *data_in);
-static int ni_serial_sw_readwrite8(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_serial_sw_readwrite8(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned char data_out, unsigned char *data_in);
-static int ni_calib_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_calib_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_calib_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_calib_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_eeprom_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_eeprom_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int ni_m_series_eeprom_insn_read(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static int ni_pfi_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_pfi_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_pfi_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_pfi_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static unsigned ni_old_get_pfi_routing(struct comedi_device * dev, unsigned chan);
static void ni_rtsi_init(struct comedi_device * dev);
-static int ni_rtsi_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_rtsi_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_rtsi_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_rtsi_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static void caldac_setup(struct comedi_device * dev, comedi_subdevice * s);
+static void caldac_setup(struct comedi_device * dev, struct comedi_subdevice * s);
static int ni_read_eeprom(struct comedi_device * dev, int addr);
#ifdef DEBUG_STATUS_A
#define ni_mio_print_status_b(a)
#endif
-static int ni_ai_reset(struct comedi_device * dev, comedi_subdevice * s);
+static int ni_ai_reset(struct comedi_device * dev, struct comedi_subdevice * s);
#ifndef PCIDMA
static void ni_handle_fifo_half_full(struct comedi_device * dev);
-static int ni_ao_fifo_half_empty(struct comedi_device * dev, comedi_subdevice * s);
+static int ni_ao_fifo_half_empty(struct comedi_device * dev, struct comedi_subdevice * s);
#endif
static void ni_handle_fifo_dregs(struct comedi_device * dev);
-static int ni_ai_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum);
static void ni_load_channelgain_list(struct comedi_device * dev, unsigned int n_chan,
unsigned int *list);
static void shutdown_ai_command(struct comedi_device * dev);
-static int ni_ao_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum);
-static int ni_ao_reset(struct comedi_device * dev, comedi_subdevice * s);
+static int ni_ao_reset(struct comedi_device * dev, struct comedi_subdevice * s);
static int ni_8255_callback(int dir, int port, int data, unsigned long arg);
-static int ni_gpct_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_gpct_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_gpct_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_gpct_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int ni_gpct_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int ni_gpct_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int ni_gpct_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int ni_gpct_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static void handle_gpct_interrupt(struct comedi_device * dev,
unsigned short counter_index);
static int init_cs5529(struct comedi_device * dev);
static int cs5529_do_conversion(struct comedi_device * dev, unsigned short *data);
-static int cs5529_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int cs5529_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
#ifdef NI_CS5529_DEBUG
static unsigned int cs5529_config_read(struct comedi_device * dev,
static void cs5529_config_write(struct comedi_device * dev, unsigned int value,
unsigned int reg_select_bits);
-static int ni_m_series_pwm_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_m_series_pwm_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_6143_pwm_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_6143_pwm_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static int ni_set_master_clock(struct comedi_device * dev, unsigned source,
#ifdef PCIDMA
static void ni_sync_ai_dma(struct comedi_device * dev)
{
- comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
+ struct comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
unsigned long flags;
comedi_spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
static void mite_handle_b_linkc(struct mite_struct *mite, struct comedi_device * dev)
{
- comedi_subdevice *s = dev->subdevices + NI_AO_SUBDEV;
+ struct comedi_subdevice *s = dev->subdevices + NI_AO_SUBDEV;
unsigned long flags;
comedi_spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
}
#endif //PCIDMA
-static void ni_handle_eos(struct comedi_device * dev, comedi_subdevice * s)
+static void ni_handle_eos(struct comedi_device * dev, struct comedi_subdevice * s)
{
if (devpriv->aimode == AIMODE_SCAN) {
#ifdef PCIDMA
static void shutdown_ai_command(struct comedi_device * dev)
{
- comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
+ struct comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
#ifdef PCIDMA
ni_ai_drain_dma(dev);
s->async->events |= COMEDI_CB_EOA;
}
-static void ni_event(struct comedi_device * dev, comedi_subdevice * s)
+static void ni_event(struct comedi_device * dev, struct comedi_subdevice * s)
{
if (s->async->
events & (COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW | COMEDI_CB_EOA))
unsigned short counter_index)
{
#ifdef PCIDMA
- comedi_subdevice *s = dev->subdevices + NI_GPCT_SUBDEV(counter_index);
+ struct comedi_subdevice *s = dev->subdevices + NI_GPCT_SUBDEV(counter_index);
ni_tio_handle_interrupt(&devpriv->counter_dev->counters[counter_index],
s);
static void handle_a_interrupt(struct comedi_device * dev, unsigned short status,
unsigned ai_mite_status)
{
- comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
+ struct comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
//67xx boards don't have ai subdevice, but their gpct0 might generate an a interrupt
if (s->type == COMEDI_SUBD_UNUSED)
static void handle_b_interrupt(struct comedi_device * dev, unsigned short b_status,
unsigned ao_mite_status)
{
- comedi_subdevice *s = dev->subdevices + NI_AO_SUBDEV;
+ struct comedi_subdevice *s = dev->subdevices + NI_AO_SUBDEV;
//unsigned short ack=0;
#ifdef DEBUG_INTERRUPT
rt_printk("ni_mio_common: interrupt: b_status=%04x m1_status=%08x\n",
#ifndef PCIDMA
-static void ni_ao_fifo_load(struct comedi_device * dev, comedi_subdevice * s, int n)
+static void ni_ao_fifo_load(struct comedi_device * dev, struct comedi_subdevice * s, int n)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
* RT code, as RT code might purposely be running close to the
* metal. Needs to be fixed eventually.
*/
-static int ni_ao_fifo_half_empty(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_ao_fifo_half_empty(struct comedi_device * dev, struct comedi_subdevice * s)
{
int n;
return 1;
}
-static int ni_ao_prep_fifo(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_ao_prep_fifo(struct comedi_device * dev, struct comedi_subdevice * s)
{
int n;
return n;
}
-static void ni_ai_fifo_read(struct comedi_device * dev, comedi_subdevice * s, int n)
+static void ni_ai_fifo_read(struct comedi_device * dev, struct comedi_subdevice * s, int n)
{
comedi_async *async = s->async;
int i;
static void ni_handle_fifo_half_full(struct comedi_device * dev)
{
int n;
- comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
+ struct comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
n = boardtype.ai_fifo_depth / 2;
*/
static void ni_handle_fifo_dregs(struct comedi_device * dev)
{
- comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
+ struct comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
short data[2];
u32 dl;
short fifo_empty;
static void get_last_sample_611x(struct comedi_device * dev)
{
- comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
+ struct comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
short data;
u32 dl;
static void get_last_sample_6143(struct comedi_device * dev)
{
- comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
+ struct comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
short data;
u32 dl;
}
}
-static void ni_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
+static void ni_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int chan_index)
{
comedi_async *async = s->async;
static int ni_ai_setup_MITE_dma(struct comedi_device * dev)
{
- comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
+ struct comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
int retval;
unsigned long flags;
static int ni_ao_setup_MITE_dma(struct comedi_device * dev)
{
- comedi_subdevice *s = dev->subdevices + NI_AO_SUBDEV;
+ struct comedi_subdevice *s = dev->subdevices + NI_AO_SUBDEV;
int retval;
unsigned long flags;
this is pretty harsh for a cancel, but it works...
*/
-static int ni_ai_reset(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_ai_reset(struct comedi_device * dev, struct comedi_subdevice * s)
{
ni_release_ai_mite_channel(dev);
/* ai configuration */
return 0;
}
-static int ni_ai_poll(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_ai_poll(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags = 0;
int count;
return count;
}
-static int ni_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
return boardtype.ai_speed * num_channels;
}
-static int ni_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int ni_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
const comedi_cmd *cmd = &s->async->cmd;
int timer;
return 0;
}
-static int ni_ai_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum)
{
if (trignum != 0)
return 1;
}
-static int ni_ai_config_analog_trig(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_config_analog_trig(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_ai_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
return -EINVAL;
}
-static int ni_ai_config_analog_trig(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_config_analog_trig(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int a, b, modebits;
}
/* munge data from unsigned to 2's complement for analog output bipolar modes */
-static void ni_ao_munge(struct comedi_device * dev, comedi_subdevice * s,
+static void ni_ao_munge(struct comedi_device * dev, struct comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int chan_index)
{
comedi_async *async = s->async;
}
static int ni_m_series_ao_config_chanlist(struct comedi_device * dev,
- comedi_subdevice * s, unsigned int chanspec[], unsigned int n_chans,
+ struct comedi_subdevice * s, unsigned int chanspec[], unsigned int n_chans,
int timed)
{
unsigned int range;
return invert;
}
-static int ni_old_ao_config_chanlist(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_old_ao_config_chanlist(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int chanspec[], unsigned int n_chans)
{
unsigned int range;
return invert;
}
-static int ni_ao_config_chanlist(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_config_chanlist(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int chanspec[], unsigned int n_chans, int timed)
{
if (boardtype.reg_type & ni_reg_m_series_mask)
else
return ni_old_ao_config_chanlist(dev, s, chanspec, n_chans);
}
-static int ni_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao[CR_CHAN(insn->chanspec)];
return 1;
}
-static int ni_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
return 1;
}
-static int ni_ao_insn_write_671x(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_insn_write_671x(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
return 1;
}
-static int ni_ao_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
return -EINVAL;
}
-static int ni_ao_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum)
{
int ret;
return 0;
}
-static int ni_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
const comedi_cmd *cmd = &s->async->cmd;
int bits;
return 0;
}
-static int ni_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int ni_ao_reset(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_ao_reset(struct comedi_device * dev, struct comedi_subdevice * s)
{
//devpriv->ao0p=0x0000;
//ni_writew(devpriv->ao0p,AO_Configuration);
// digital io
-static int ni_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
#ifdef DEBUG_DIO
return 1;
}
-static int ni_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
#ifdef DEBUG_DIO
}
static int ni_m_series_dio_insn_config(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
#ifdef DEBUG_DIO
rt_printk("ni_m_series_dio_insn_config() chan=%d io=%d\n",
return 1;
}
-static int ni_m_series_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_m_series_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
#ifdef DEBUG_DIO
return 2;
}
-static int ni_cdio_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_cdio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int ni_cdio_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_cdio_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
const comedi_cmd *cmd = &s->async->cmd;
unsigned cdo_mode_bits = CDO_FIFO_Mode_Bit | CDO_Halt_On_Error_Bit;
return 0;
}
-static int ni_cdo_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_cdo_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum)
{
#ifdef PCIDMA
return retval;
}
-static int ni_cdio_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_cdio_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
ni_writel(CDO_Disarm_Bit | CDO_Error_Interrupt_Enable_Clear_Bit |
CDO_Empty_FIFO_Interrupt_Enable_Clear_Bit |
static void handle_cdio_interrupt(struct comedi_device * dev)
{
unsigned cdio_status;
- comedi_subdevice *s = dev->subdevices + NI_DIO_SUBDEV;
+ struct comedi_subdevice *s = dev->subdevices + NI_DIO_SUBDEV;
#ifdef PCIDMA
unsigned long flags;
#endif
ni_event(dev, s);
}
-static int ni_serial_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_serial_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int err = insn->n;
}
-static int ni_serial_hw_readwrite8(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_serial_hw_readwrite8(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned char data_out, unsigned char *data_in)
{
unsigned int status1;
return err;
}
-static int ni_serial_sw_readwrite8(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_serial_sw_readwrite8(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned char data_out, unsigned char *data_in)
{
unsigned char mask, input = 0;
subdev_8255_cleanup(dev, dev->subdevices + NI_8255_DIO_SUBDEV);
}
-static void init_ao_67xx(struct comedi_device * dev, comedi_subdevice * s)
+static void init_ao_67xx(struct comedi_device * dev, struct comedi_subdevice * s)
{
int i;
}
static int ni_freq_out_insn_read(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->clock_and_fout & FOUT_Divider_mask;
return 1;
}
static int ni_freq_out_insn_write(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
devpriv->clock_and_fout &= ~FOUT_Enable;
devpriv->stc_writew(dev, devpriv->clock_and_fout,
}
}
-static int ni_freq_out_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_freq_out_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
static int ni_E_init(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned j;
enum ni_gpct_variant counter_variant;
presents the EEPROM as a subdevice
*/
-static int ni_eeprom_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_eeprom_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = ni_read_eeprom(dev, CR_CHAN(insn->chanspec));
}
static int ni_m_series_eeprom_insn_read(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->eeprom_buffer[CR_CHAN(insn->chanspec)];
return 3;
}
-static int ni_m_series_pwm_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_m_series_pwm_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned up_count, down_count;
return 0;
}
-static int ni_6143_pwm_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_6143_pwm_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned up_count, down_count;
/*
calibration subdevice
*/
-static int ni_calib_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_calib_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
ni_write_caldac(dev, CR_CHAN(insn->chanspec), data[0]);
return 1;
}
-static int ni_calib_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_calib_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->caldacs[CR_CHAN(insn->chanspec)];
[ad8804_debug] = {16, 8, pack_ad8804},
};
-static void caldac_setup(struct comedi_device * dev, comedi_subdevice * s)
+static void caldac_setup(struct comedi_device * dev, struct comedi_subdevice * s)
{
int i, j;
int n_dacs;
#endif
-static int ni_gpct_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
struct ni_gpct *counter = s->private;
return ni_tio_insn_config(counter, insn, data);
}
-static int ni_gpct_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
struct ni_gpct *counter = s->private;
return ni_tio_rinsn(counter, insn, data);
}
-static int ni_gpct_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
struct ni_gpct *counter = s->private;
return ni_tio_winsn(counter, insn, data);
}
-static int ni_gpct_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_gpct_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
int retval;
#ifdef PCIDMA
return retval;
}
-static int ni_gpct_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
#ifdef PCIDMA
#endif
}
-static int ni_gpct_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_gpct_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
#ifdef PCIDMA
struct ni_gpct *counter = s->private;
return 0;
}
-static int ni_pfi_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_pfi_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if ((boardtype.reg_type & ni_reg_m_series_mask) == 0) {
return 2;
}
-static int ni_pfi_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_pfi_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int chan;
// devpriv->stc_writew(dev, 0x0000, RTSI_Board_Register);
}
-static int ni_rtsi_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_rtsi_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
}
}
-static int ni_rtsi_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_rtsi_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
return 0;
}
-static int cs5529_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int cs5529_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, retval;
static int nidio_attach(struct comedi_device * dev, comedi_devconfig * it);
static int nidio_detach(struct comedi_device * dev);
-static int ni_pcidio_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int ni_pcidio_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static comedi_driver driver_pcidio = {
driver_name:"ni_pcidio",
} nidio96_private;
#define devpriv ((nidio96_private *)dev->private)
-static int ni_pcidio_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int ni_pcidio_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int ni_pcidio_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int ni_pcidio_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum);
static int nidio_find_device(struct comedi_device * dev, int bus, int slot);
static int ni_pcidio_ns_to_timer(int *nanosec, int round_mode);
-static int setup_mite_dma(struct comedi_device * dev, comedi_subdevice * s);
+static int setup_mite_dma(struct comedi_device * dev, struct comedi_subdevice * s);
#ifdef DEBUG_FLAGS
static void ni_pcidio_print_flags(unsigned int flags);
}
}
-void ni_pcidio_event(struct comedi_device * dev, comedi_subdevice * s)
+void ni_pcidio_event(struct comedi_device * dev, struct comedi_subdevice * s)
{
if (s->async->
events & (COMEDI_CB_EOA | COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW))
static irqreturn_t nidio_interrupt(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices;
+ struct comedi_subdevice *s = dev->subdevices;
comedi_async *async = s->async;
struct mite_struct *mite = devpriv->mite;
}
#endif
-static int ni_pcidio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 1)
return 1;
}
-static int ni_pcidio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int ni_pcidio_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return divider;
}
-static int ni_pcidio_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_pcidio_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
return 0;
}
-static int setup_mite_dma(struct comedi_device * dev, comedi_subdevice * s)
+static int setup_mite_dma(struct comedi_device * dev, struct comedi_subdevice * s)
{
int retval;
return 0;
}
-static int ni_pcidio_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum)
{
if (trignum != 0)
return 1;
}
-static int ni_pcidio_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int ni_pcidio_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
writeb(0x00,
devpriv->mite->daq_io_addr + Master_DMA_And_Interrupt_Control);
return 0;
}
-static int ni_pcidio_change(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_change(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long new_size)
{
int ret;
static int nidio_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int i;
int ret;
int n_subdevices;
#include "ni_mio_common.c"
static int pcimio_find_device(struct comedi_device * dev, int bus, int slot);
-static int pcimio_ai_change(struct comedi_device * dev, comedi_subdevice * s,
+static int pcimio_ai_change(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long new_size);
-static int pcimio_ao_change(struct comedi_device * dev, comedi_subdevice * s,
+static int pcimio_ao_change(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long new_size);
-static int pcimio_gpct0_change(struct comedi_device * dev, comedi_subdevice * s,
+static int pcimio_gpct0_change(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long new_size);
-static int pcimio_gpct1_change(struct comedi_device * dev, comedi_subdevice * s,
+static int pcimio_gpct1_change(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long new_size);
-static int pcimio_dio_change(struct comedi_device * dev, comedi_subdevice * s,
+static int pcimio_dio_change(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long new_size);
static void m_series_init_eeprom_buffer(struct comedi_device * dev)
return -EIO;
}
-static int pcimio_ai_change(struct comedi_device * dev, comedi_subdevice * s,
+static int pcimio_ai_change(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long new_size)
{
int ret;
return 0;
}
-static int pcimio_ao_change(struct comedi_device * dev, comedi_subdevice * s,
+static int pcimio_ao_change(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long new_size)
{
int ret;
return 0;
}
-static int pcimio_gpct0_change(struct comedi_device * dev, comedi_subdevice * s,
+static int pcimio_gpct0_change(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long new_size)
{
int ret;
return 0;
}
-static int pcimio_gpct1_change(struct comedi_device * dev, comedi_subdevice * s,
+static int pcimio_gpct1_change(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long new_size)
{
int ret;
return 0;
}
-static int pcimio_dio_change(struct comedi_device * dev, comedi_subdevice * s,
+static int pcimio_dio_change(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned long new_size)
{
int ret;
extern int ni_tio_cmdtest(struct ni_gpct *counter, comedi_cmd * cmd);
extern int ni_tio_cancel(struct ni_gpct *counter);
extern void ni_tio_handle_interrupt(struct ni_gpct *counter,
- comedi_subdevice * s);
+ struct comedi_subdevice * s);
extern void ni_tio_set_mite_channel(struct ni_gpct *counter,
struct mite_channel *mite_chan);
extern void ni_tio_acknowledge_and_confirm(struct ni_gpct *counter,
int *gate_error, int *tc_error, int *perm_stale_data, int *stale_data);
-static inline struct ni_gpct *subdev_to_counter(comedi_subdevice * s)
+static inline struct ni_gpct *subdev_to_counter(struct comedi_subdevice * s)
{
return s->private;
}
}
}
-static int ni_tio_input_inttrig(struct comedi_device * dev, comedi_subdevice * s,
+static int ni_tio_input_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum)
{
unsigned long flags;
}
}
-void ni_tio_handle_interrupt(struct ni_gpct *counter, comedi_subdevice * s)
+void ni_tio_handle_interrupt(struct ni_gpct *counter, struct comedi_subdevice * s)
{
unsigned gpct_mite_status;
unsigned long flags;
int lo, hi;
int data;
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
if (!dev->attached) {
comedi_error(dev, "spurious interrupt");
}
}
-static int pcl711_ai_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl711_ai_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
return n;
}
-static int pcl711_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl711_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int tmp;
return 0;
}
-static int pcl711_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int pcl711_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
int timer1, timer2;
comedi_cmd *cmd = &s->async->cmd;
/*
analog output
*/
-static int pcl711_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl711_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
return n;
}
-static int pcl711_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl711_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
}
/* Digital port read - Untested on 8112 */
-static int pcl711_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl711_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
}
/* Digital port write - Untested on 8112 */
-static int pcl711_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl711_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
int ret;
unsigned long iobase;
unsigned int irq;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
/* claim our I/O space */
COMEDI_INITCLEANUP(driver_pcl725);
-static int pcl725_do_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl725_do_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int pcl725_di_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl725_di_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
static int pcl725_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
iobase = it->options[0];
} pcl726_private;
#define devpriv ((pcl726_private *)dev->private)
-static int pcl726_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl726_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int hi, lo;
return n;
}
-static int pcl726_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl726_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
return n;
}
-static int pcl726_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl726_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int pcl726_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl726_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
static int pcl726_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
unsigned int iorange;
int ret, i;
COMEDI_INITCLEANUP(driver_pcl730);
-static int pcl730_do_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl730_do_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int pcl730_di_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl730_di_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
static int pcl730_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
unsigned int iorange;
*/
static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2);
-static void setup_range_channel(struct comedi_device * dev, comedi_subdevice * s,
+static void setup_range_channel(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int rangechan, char wait);
-static int pcl812_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int pcl812_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
/*
==============================================================================
*/
-static int pcl812_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl812_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
/*
==============================================================================
*/
-static int acl8216_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int acl8216_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
/*
==============================================================================
*/
-static int pcl812_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl812_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
/*
==============================================================================
*/
-static int pcl812_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl812_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
/*
==============================================================================
*/
-static int pcl812_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl812_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
/*
==============================================================================
*/
-static int pcl812_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl812_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
/*
==============================================================================
*/
-static int pcl812_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl812_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
/*
==============================================================================
*/
-static int pcl812_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int pcl812_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned int divisor1 = 0, divisor2 = 0, i, dma_flags, bytes;
comedi_cmd *cmd = &s->async->cmd;
char err = 1;
unsigned int mask, timeout;
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
s->async->events = 0;
/*
==============================================================================
*/
-static void transfer_from_dma_buf(struct comedi_device * dev, comedi_subdevice * s,
+static void transfer_from_dma_buf(struct comedi_device * dev, struct comedi_subdevice * s,
short * ptr, unsigned int bufptr, unsigned int len)
{
unsigned int i;
static irqreturn_t interrupt_pcl812_ai_dma(int irq, void *d)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
unsigned long dma_flags;
int len, bufptr;
short *ptr;
/*
==============================================================================
*/
-static int pcl812_ai_poll(struct comedi_device * dev, comedi_subdevice * s)
+static int pcl812_ai_poll(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
unsigned int top1, top2, i;
/*
==============================================================================
*/
-static void setup_range_channel(struct comedi_device * dev, comedi_subdevice * s,
+static void setup_range_channel(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int rangechan, char wait)
{
unsigned char chan_reg = CR_CHAN(rangechan); // normal board
/*
==============================================================================
*/
-static int pcl812_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int pcl812_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
#ifdef PCL812_EXTDEBUG
rt_printk("pcl812 EDBG: BGN: pcl812_ai_cancel(...)\n");
unsigned int irq;
unsigned int dma;
unsigned long pages;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int n_subdevices;
iobase = it->options[0];
#endif
int irq_was_now_closed; // when IRQ finish, there's stored int816_mode for last interrupt
int int816_mode; // who now uses IRQ - 1=AI1 int, 2=AI1 dma, 3=AI3 int, 4AI3 dma
- comedi_subdevice *last_int_sub; // ptr to subdevice which now finish
+ struct comedi_subdevice *last_int_sub; // ptr to subdevice which now finish
int ai_act_scan; // how many scans we finished
unsigned int ai_act_chanlist[16]; // MUX setting for actual AI operations
unsigned int ai_act_chanlist_len; // how long is actual MUX list
unsigned int ai_act_chanlist_pos; // actual position in MUX list
unsigned int ai_poll_ptr; // how many sampes transfer poll
- comedi_subdevice *sub_ai; // ptr to AI subdevice
+ struct comedi_subdevice *sub_ai; // ptr to AI subdevice
#ifdef unused
struct timer_list rtc_irq_timer; // timer for RTC sanity check
unsigned long rtc_freq; // RTC int freq
==============================================================================
*/
static int check_and_setup_channel_list(struct comedi_device * dev,
- comedi_subdevice * s, unsigned int *chanlist, int chanlen);
-static int pcl816_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+ struct comedi_subdevice * s, unsigned int *chanlist, int chanlen);
+static int pcl816_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2);
#ifdef unused
static int set_rtc_irq_bit(unsigned char bit);
#endif
-static int pcl816_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl816_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
-static int pcl816_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int pcl816_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
/*
==============================================================================
ANALOG INPUT MODE0, 816 cards, slow version
*/
-static int pcl816_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl816_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
int low, hi;
int timeout = 50; /* wait max 50us */
==============================================================================
analog input dma mode 1 & 3, 816 cards
*/
-static void transfer_from_dma_buf(struct comedi_device * dev, comedi_subdevice * s,
+static void transfer_from_dma_buf(struct comedi_device * dev, struct comedi_subdevice * s,
short * ptr, unsigned int bufptr, unsigned int len)
{
int i;
static irqreturn_t interrupt_pcl816_ai_mode13_dma(int irq, void *d)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
int len, bufptr, this_dma_buf;
unsigned long dma_flags;
short *ptr;
/*
==============================================================================
*/
-static int pcl816_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl816_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int pcl816_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int pcl816_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned int divisor1 = 0, divisor2 = 0, dma_flags, bytes, dmairq;
comedi_cmd *cmd = &s->async->cmd;
return 0;
}
-static int pcl816_ai_poll(struct comedi_device * dev, comedi_subdevice * s)
+static int pcl816_ai_poll(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
unsigned int top1, top2, i;
==============================================================================
cancel any mode 1-4 AI
*/
-static int pcl816_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int pcl816_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
// DEBUG(rt_printk("pcl816_ai_cancel()\n");)
If it's ok, then program scan/gain logic
*/
static int
-check_and_setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+check_and_setup_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int *chanlist, int chanlen)
{
unsigned int chansegment[16];
unsigned int irq, dma;
unsigned long pages;
//int i;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
/* claim our I/O space */
iobase = it->options[0];
int irq_blocked; // 1=IRQ now uses any subdev
int irq_was_now_closed; // when IRQ finish, there's stored int818_mode for last interrupt
int ai_mode; // who now uses IRQ - 1=AI1 int, 2=AI1 dma, 3=AI3 int, 4AI3 dma
- comedi_subdevice *last_int_sub; // ptr to subdevice which now finish
+ struct comedi_subdevice *last_int_sub; // ptr to subdevice which now finish
int ai_act_scan; // how many scans we finished
int ai_act_chan; // actual position in actual scan
unsigned int act_chanlist[16]; // MUX setting for actual AI operations
short *ai_data; // data buffer
unsigned int ai_timer1; // timers
unsigned int ai_timer2;
- comedi_subdevice *sub_ai; // ptr to AI subdevice
+ struct comedi_subdevice *sub_ai; // ptr to AI subdevice
unsigned char usefifo; // 1=use fifo
unsigned int ao_readback[2];
} pcl818_private;
/*
==============================================================================
*/
-static void setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+static void setup_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan, unsigned int seglen);
-static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan);
-static int pcl818_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int pcl818_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2);
==============================================================================
ANALOG INPUT MODE0, 818 cards, slow version
*/
-static int pcl818_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl818_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
ANALOG OUTPUT MODE0, 818 cards
only one sample per call is supported
*/
-static int pcl818_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl818_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
return n;
}
-static int pcl818_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl818_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
only one sample per call is supported
*/
-static int pcl818_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl818_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
only one sample per call is supported
*/
-static int pcl818_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl818_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
static irqreturn_t interrupt_pcl818_ai_mode13_int(int irq, void *d)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
int low;
int timeout = 50; /* wait max 50us */
static irqreturn_t interrupt_pcl818_ai_mode13_dma(int irq, void *d)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
int i, len, bufptr;
unsigned long flags;
short *ptr;
static irqreturn_t interrupt_pcl818_ai_mode13_dma_rtc(int irq, void *d)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
unsigned long tmp;
unsigned int top1, top2, i, bufptr;
long ofs_dats;
static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d)
{
struct comedi_device *dev = d;
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
int i, len, lo;
outb(0, dev->iobase + PCL818_FI_INTCLR); // clear fifo int request
because the card doesn't seem to like being reprogrammed
while a DMA transfer is in progress
*/
- comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = dev->subdevices + 0;
devpriv->ai_mode = devpriv->irq_was_now_closed;
devpriv->irq_was_now_closed = 0;
devpriv->neverending_ai = 0;
ANALOG INPUT MODE 1 or 3 DMA , 818 cards
*/
static void pcl818_ai_mode13dma_int(int mode, struct comedi_device * dev,
- comedi_subdevice * s)
+ struct comedi_subdevice * s)
{
unsigned int flags;
unsigned int bytes;
ANALOG INPUT MODE 1 or 3 DMA rtc, 818 cards
*/
static void pcl818_ai_mode13dma_rtc(int mode, struct comedi_device * dev,
- comedi_subdevice * s)
+ struct comedi_subdevice * s)
{
unsigned int flags;
short *pole;
ANALOG INPUT MODE 1 or 3, 818 cards
*/
static int pcl818_ai_cmd_mode(int mode, struct comedi_device * dev,
- comedi_subdevice * s)
+ struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int divisor1, divisor2;
ANALOG OUTPUT MODE 1 or 3, 818 cards
*/
#ifdef PCL818_MODE13_AO
-static int pcl818_ao_mode13(int mode, struct comedi_device * dev, comedi_subdevice * s,
+static int pcl818_ao_mode13(int mode, struct comedi_device * dev, struct comedi_subdevice * s,
comedi_trig * it)
{
int divisor1, divisor2;
==============================================================================
ANALOG OUTPUT MODE 1, 818 cards
*/
-static int pcl818_ao_mode1(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl818_ao_mode1(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_trig * it)
{
return pcl818_ao_mode13(1, dev, s, it);
==============================================================================
ANALOG OUTPUT MODE 3, 818 cards
*/
-static int pcl818_ao_mode3(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl818_ao_mode3(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_trig * it)
{
return pcl818_ao_mode13(3, dev, s, it);
Check if channel list from user is builded correctly
If it's ok, then program scan/gain logic
*/
-static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan)
{
unsigned int chansegment[16];
return seglen;
}
-static void setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
+static void setup_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan, unsigned int seglen)
{
int i;
/*
==============================================================================
*/
-static int ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
/*
==============================================================================
*/
-static int ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int retval;
==============================================================================
cancel any mode 1-4 AI
*/
-static int pcl818_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int pcl818_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
if (devpriv->irq_blocked > 0) {
rt_printk("pcl818_ai_cancel()\n");
unsigned long iobase;
unsigned int irq, dma;
unsigned long pages;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
if ((ret = alloc_private(dev, sizeof(pcl818_private))) < 0)
return ret; /* Can't alloc mem */
}
}
-static int compute_buffer(int config, int devno, comedi_subdevice * s)
+static int compute_buffer(int config, int devno, struct comedi_subdevice * s)
{
/* 1 in io_bits indicates output */
if (s->io_bits & 0x0000ff) {
return config;
}
-static void do_3724_config(struct comedi_device * dev, comedi_subdevice * s,
+static void do_3724_config(struct comedi_device * dev, struct comedi_subdevice * s,
int chanspec)
{
int config;
outb(config, port_8255_cfg);
}
-static void enable_chan(struct comedi_device * dev, comedi_subdevice * s, int chanspec)
+static void enable_chan(struct comedi_device * dev, struct comedi_subdevice * s, int chanspec)
{
unsigned int mask;
int gatecfg;
}
/* overriding the 8255 insn config */
-static int subdev_3724_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int subdev_3724_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int mask;
COMEDI_INITCLEANUP(driver_pcm3730);
-static int pcm3730_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcm3730_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int pcm3730_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcm3730_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
static int pcm3730_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
iobase = it->options[0];
#define TIMEOUT 100
-static int pcmad_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int pcmad_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
static int pcmad_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
iobase = it->options[0];
num_names:sizeof(pcmda12_boards) / sizeof(pcmda12_board),
};
-static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/*
*/
static int pcmda12_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
iobase = it->options[0];
inb(LSB_PORT(0)); /* update chans. */
}
-static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
DAC outputs, which makes all AO channels update simultaneously.
This is useful for some control applications, I would imagine.
*/
-static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
#define PAGE_ENAB 2
#define PAGE_INT_ID 3
-typedef int (*comedi_insn_fn_t) (struct comedi_device *, comedi_subdevice *,
+typedef int (*comedi_insn_fn_t) (struct comedi_device *, struct comedi_subdevice *,
comedi_insn *, unsigned int *);
-static int ai_rinsn(struct comedi_device *, comedi_subdevice *, comedi_insn *,
+static int ai_rinsn(struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
unsigned int *);
-static int ao_rinsn(struct comedi_device *, comedi_subdevice *, comedi_insn *,
+static int ao_rinsn(struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
unsigned int *);
-static int ao_winsn(struct comedi_device *, comedi_subdevice *, comedi_insn *,
+static int ao_winsn(struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
unsigned int *);
/*
num_names:sizeof(pcmmio_boards) / sizeof(pcmmio_board),
};
-static int pcmmio_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcmmio_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pcmmio_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int pcmmio_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG);
-static void pcmmio_stop_intr(struct comedi_device *, comedi_subdevice *);
-static int pcmmio_cancel(struct comedi_device * dev, comedi_subdevice * s);
-static int pcmmio_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int pcmmio_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static void pcmmio_stop_intr(struct comedi_device *, struct comedi_subdevice *);
+static int pcmmio_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
+static int pcmmio_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int pcmmio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
/* some helper functions to deal with specifics of this device's registers */
*/
static int pcmmio_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int sdev_no, chans_left, n_dio_subdevs, n_subdevs, port, asic,
thisasic_chanct = 0;
unsigned long iobase;
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int pcmmio_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcmmio_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int byte_no;
* configured by a special insn_config instruction. chanspec
* contains the channel to be changed, and data[0] contains the
* value COMEDI_INPUT or COMEDI_OUTPUT. */
-static int pcmmio_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int pcmmio_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec), byte_no = chan / 8, bit_no =
spinlock, flags);
if (triggered) {
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
/* TODO here: dispatch io lines to subdevs with commands.. */
printk("PCMMIO DEBUG: got edge detect interrupt %d asic %d which_chans: %06x\n", irq, asic, triggered);
for (s = dev->subdevices + 2;
return IRQ_HANDLED;
}
-static void pcmmio_stop_intr(struct comedi_device * dev, comedi_subdevice * s)
+static void pcmmio_stop_intr(struct comedi_device * dev, struct comedi_subdevice * s)
{
int nports, firstport, asic, port;
}
}
-static int pcmmio_start_intr(struct comedi_device * dev, comedi_subdevice * s)
+static int pcmmio_start_intr(struct comedi_device * dev, struct comedi_subdevice * s)
{
if (!subpriv->dio.intr.continuous && subpriv->dio.intr.stop_count == 0) {
/* An empty acquisition! */
return 0;
}
-static int pcmmio_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int pcmmio_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
* Internal trigger function to start acquisition for an 'INTERRUPT' subdevice.
*/
static int
-pcmmio_inttrig_start_intr(struct comedi_device * dev, comedi_subdevice * s,
+pcmmio_inttrig_start_intr(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum)
{
unsigned long flags;
/*
* 'do_cmd' function for an 'INTERRUPT' subdevice.
*/
-static int pcmmio_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int pcmmio_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned long flags;
* 'do_cmdtest' function for an 'INTERRUPT' subdevice.
*/
static int
-pcmmio_cmdtest(struct comedi_device * dev, comedi_subdevice * s, comedi_cmd * cmd)
+pcmmio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, comedi_cmd * cmd)
{
int err = 0;
unsigned int tmp;
}
/* All this is for AI and AO */
-static int ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
return n;
}
-static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
return 1;
}
-static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
num_names:sizeof(pcmuio_boards) / sizeof(pcmuio_board),
};
-static int pcmuio_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcmuio_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pcmuio_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int pcmuio_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static irqreturn_t interrupt_pcmuio(int irq, void *d PT_REGS_ARG);
-static void pcmuio_stop_intr(struct comedi_device *, comedi_subdevice *);
-static int pcmuio_cancel(struct comedi_device * dev, comedi_subdevice * s);
-static int pcmuio_cmd(struct comedi_device * dev, comedi_subdevice * s);
-static int pcmuio_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static void pcmuio_stop_intr(struct comedi_device *, struct comedi_subdevice *);
+static int pcmuio_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
+static int pcmuio_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
+static int pcmuio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
/* some helper functions to deal with specifics of this device's registers */
*/
static int pcmuio_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int sdev_no, chans_left, n_subdevs, port, asic, thisasic_chanct = 0;
unsigned long iobase;
unsigned int irq[MAX_ASICS];
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int pcmuio_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcmuio_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int byte_no;
* configured by a special insn_config instruction. chanspec
* contains the channel to be changed, and data[0] contains the
* value COMEDI_INPUT or COMEDI_OUTPUT. */
-static int pcmuio_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int pcmuio_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec), byte_no = chan / 8, bit_no =
spinlock, flags);
if (triggered) {
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
/* TODO here: dispatch io lines to subdevs with commands.. */
printk("PCMUIO DEBUG: got edge detect interrupt %d asic %d which_chans: %06x\n", irq, asic, triggered);
for (s = dev->subdevices;
return IRQ_HANDLED;
}
-static void pcmuio_stop_intr(struct comedi_device * dev, comedi_subdevice * s)
+static void pcmuio_stop_intr(struct comedi_device * dev, struct comedi_subdevice * s)
{
int nports, firstport, asic, port;
}
}
-static int pcmuio_start_intr(struct comedi_device * dev, comedi_subdevice * s)
+static int pcmuio_start_intr(struct comedi_device * dev, struct comedi_subdevice * s)
{
if (!subpriv->intr.continuous && subpriv->intr.stop_count == 0) {
/* An empty acquisition! */
return 0;
}
-static int pcmuio_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int pcmuio_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
unsigned long flags;
* Internal trigger function to start acquisition for an 'INTERRUPT' subdevice.
*/
static int
-pcmuio_inttrig_start_intr(struct comedi_device * dev, comedi_subdevice * s,
+pcmuio_inttrig_start_intr(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum)
{
unsigned long flags;
/*
* 'do_cmd' function for an 'INTERRUPT' subdevice.
*/
-static int pcmuio_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int pcmuio_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned long flags;
* 'do_cmdtest' function for an 'INTERRUPT' subdevice.
*/
static int
-pcmuio_cmdtest(struct comedi_device * dev, comedi_subdevice * s, comedi_cmd * cmd)
+pcmuio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, comedi_cmd * cmd)
{
int err = 0;
unsigned int tmp;
static int poc_attach(struct comedi_device * dev, comedi_devconfig * it);
static int poc_detach(struct comedi_device * dev);
-static int readback_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dac02_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int dac02_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pcl733_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl733_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pcl734_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl734_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
struct boarddef_struct {
int type;
int n_chan;
int n_bits;
- int (*winsn) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*winsn) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
unsigned int *);
- int (*rinsn) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*rinsn) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
unsigned int *);
- int (*insnbits) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*insnbits) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
unsigned int *);
const comedi_lrange *range;
};
static int poc_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long iobase;
unsigned int iosize;
return 0;
}
-static int readback_insn(struct comedi_device * dev, comedi_subdevice * s,
+static int readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan;
#define DAC02_LSB(a) (2 * a)
#define DAC02_MSB(a) (2 * a + 1)
-static int dac02_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int dac02_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int temp;
return 1;
}
-static int pcl733_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl733_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int pcl734_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int pcl734_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
struct semaphore eos;
struct comedi_device *dev;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int count;
} local_info_t;
/* Cancel a running acquisition */
-static int daqp_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
+static int daqp_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
{
local_info_t *local = (local_info_t *) s->private;
{
local_info_t *local = (local_info_t *) dev_id;
struct comedi_device *dev;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int loop_limit = 10000;
int status;
/* One-shot analog data acquisition routine */
-static int daqp_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int daqp_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
local_info_t *local = (local_info_t *) s->private;
* the command passes.
*/
-static int daqp_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int daqp_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return 0;
}
-static int daqp_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
+static int daqp_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{
local_info_t *local = (local_info_t *) s->private;
comedi_cmd *cmd = &s->async->cmd;
/* Single-shot analog output routine */
-static int daqp_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int daqp_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
local_info_t *local = (local_info_t *) s->private;
/* Digital input routine */
-static int daqp_di_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int daqp_di_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
local_info_t *local = (local_info_t *) s->private;
/* Digital output routine */
-static int daqp_do_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int daqp_do_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
local_info_t *local = (local_info_t *) s->private;
local_info_t *local = dev_table[it->options[0]];
tuple_t tuple;
int i;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
if (it->options[0] < 0 || it->options[0] >= MAX_DEV || !local) {
printk("comedi%d: No such daqp device %d\n",
detach : rtd_detach,
};
-static int rtd_ai_rinsn(struct comedi_device *dev, comedi_subdevice *s,
+static int rtd_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int rtd_ao_winsn(struct comedi_device *dev, comedi_subdevice *s,
+static int rtd_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int rtd_ao_rinsn(struct comedi_device *dev, comedi_subdevice *s,
+static int rtd_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int rtd_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
+static int rtd_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int rtd_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
+static int rtd_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int rtd_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
+static int rtd_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd);
-static int rtd_ai_cmd(struct comedi_device *dev, comedi_subdevice *s);
-static int rtd_ai_cancel(struct comedi_device *dev, comedi_subdevice *s);
-/* static int rtd_ai_poll (struct comedi_device *dev,comedi_subdevice *s); */
+static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
+static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
+/* static int rtd_ai_poll (struct comedi_device *dev,struct comedi_subdevice *s); */
static int rtd_ns_to_timer(unsigned int *ns, int roundMode);
static irqreturn_t rtd_interrupt(int irq, void *d PT_REGS_ARG);
static int rtd520_probe_fifo_depth(struct comedi_device *dev);
*/
static int rtd_attach(struct comedi_device *dev, comedi_devconfig *it)
{ /* board name and options flags */
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
struct pci_dev *pcidev;
int ret;
resource_size_t physLas0; /* configuation */
select, delay, then read.
*/
static int rtd_ai_rinsn(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int n, ii;
int stat;
The manual claims that we can do a lword read, but it doesn't work here.
*/
-static int ai_read_n(struct comedi_device *dev, comedi_subdevice *s, int count)
+static int ai_read_n(struct comedi_device *dev, struct comedi_subdevice *s, int count)
{
int ii;
/*
unknown amout of data is waiting in fifo.
*/
-static int ai_read_dregs(struct comedi_device *dev, comedi_subdevice *s)
+static int ai_read_dregs(struct comedi_device *dev, struct comedi_subdevice *s)
{
while (RtdFifoStatus(dev) & FS_ADC_NOT_EMPTY) { /* 1 -> not empty */
short sample;
Process what is in the DMA transfer buffer and pass to comedi
Note: this is not re-entrant
*/
-static int ai_process_dma(struct comedi_device *dev, comedi_subdevice *s)
+static int ai_process_dma(struct comedi_device *dev, struct comedi_subdevice *s)
{
int ii, n;
s16 *dp;
struct comedi_device *dev = d; /* must be called "dev" for devpriv */
u16 status;
u16 fifoStatus;
- comedi_subdevice *s = dev->subdevices + 0; /* analog in subdevice */
+ struct comedi_subdevice *s = dev->subdevices + 0; /* analog in subdevice */
if (!dev->attached) {
return IRQ_NONE;
/*
return the number of samples available
*/
-static int rtd_ai_poll(struct comedi_device *dev, comedi_subdevice *s)
+static int rtd_ai_poll(struct comedi_device *dev, struct comedi_subdevice *s)
{
/* TODO: This needs to mask interrupts, read_dregs, and then re-enable */
/* Not sure what to do if DMA is active */
*/
static int rtd_ai_cmdtest(struct comedi_device *dev,
- comedi_subdevice *s, comedi_cmd *cmd)
+ struct comedi_subdevice *s, comedi_cmd *cmd)
{
int err = 0;
int tmp;
This is usually done by an interrupt handler.
Userland gets to the data using read calls.
*/
-static int rtd_ai_cmd(struct comedi_device *dev, comedi_subdevice *s)
+static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
comedi_cmd *cmd = &s->async->cmd;
int timer;
/*
Stop a running data aquisition.
*/
-static int rtd_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
+static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
u16 status;
Output one (or more) analog values to a single port as fast as possible.
*/
static int rtd_ao_winsn(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
static int rtd_ao_rinsn(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
* comedi core can convert between insn_bits and insn_read/write
*/
static int rtd_dio_insn_bits(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
if (insn->n != 2)
return -EINVAL;
Configure one bit on a IO port as Input or Output (hence the name :-).
*/
static int rtd_dio_insn_config(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
// settling delay times in usec for different gains
static const int gaindelay[] = { 10, 20, 40, 80 };
-static int rti800_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int rti800_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, t;
return i;
}
-static int rti800_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int rti800_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int rti800_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int rti800_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
return i;
}
-static int rti800_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int rti800_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int rti800_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int rti800_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
unsigned int irq;
unsigned long iobase;
int ret;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
iobase = it->options[0];
printk("comedi%d: rti800: 0x%04lx ", dev->minor, iobase);
#define devpriv ((rti802_private *)dev->private)
-static int rti802_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
+static int rti802_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
return i;
}
-static int rti802_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
+static int rti802_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, d;
static int rti802_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int i;
unsigned long iobase;
num_names:sizeof(s526_boards) / sizeof(s526_board),
};
-static int s526_gpct_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_gpct_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_gpct_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_gpct_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_gpct_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_gpct_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_ai_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_ai_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/*
*/
static int s526_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int iobase;
int i, n;
// short value;
return 0;
}
-static int s526_gpct_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_gpct_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i; // counts the Data
return i;
}
-static int s526_gpct_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_gpct_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int subdev_channel = CR_CHAN(insn->chanspec); // Unpack chanspec
return insn->n;
}
-static int s526_gpct_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_gpct_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int subdev_channel = CR_CHAN(insn->chanspec); // Unpack chanspec
}
#define ISR_ADC_DONE 0x4
-static int s526_ai_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_ai_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int result = -EINVAL;
* "instructions" read/write data in "one-shot" or "software-triggered"
* mode.
*/
-static int s526_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i;
return n;
}
-static int s526_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int s526_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int s526_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int s526_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int s526_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
COMEDI_PCI_INITCLEANUP_NOMODULE(driver_s626, s626_pci_table);
/* ioctl routines */
-static int s626_ai_insn_config(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-/* static int s626_ai_rinsn(struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data); */
-static int s626_ai_insn_read(struct comedi_device *dev, comedi_subdevice *s,
+/* static int s626_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data); */
+static int s626_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_ai_cmd(struct comedi_device *dev, comedi_subdevice *s);
-static int s626_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
+static int s626_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd);
-static int s626_ai_cancel(struct comedi_device *dev, comedi_subdevice *s);
-static int s626_ao_winsn(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
+static int s626_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_ao_rinsn(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
static int s626_dio_set_irq(struct comedi_device *dev, unsigned int chan);
static int s626_dio_reset_irq(struct comedi_device *dev, unsigned int gruop,
unsigned int mask);
static int s626_dio_clear_irq(struct comedi_device *dev);
-static int s626_enc_insn_config(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_enc_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_enc_insn_read(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_enc_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_enc_insn_write(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_enc_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
static int s626_ns_to_timer(int *nanosec, int round_mode);
static int s626_ai_load_polllist(uint8_t *ppl, comedi_cmd *cmd);
-static int s626_ai_inttrig(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int trignum);
static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG);
static unsigned int s626_ai_reg_to_uint(int data);
-/* static unsigned int s626_uint_to_reg(comedi_subdevice *s, int data); */
+/* static unsigned int s626_uint_to_reg(struct comedi_subdevice *s, int data); */
/* end ioctl routines */
int ret;
resource_size_t resourceStart;
dma_addr_t appdma;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
struct pci_dev *pdev;
if (alloc_private(dev, sizeof(struct s626_private)) < 0)
return tempdata;
}
-/* static unsigned int s626_uint_to_reg(comedi_subdevice *s, int data){ */
+/* static unsigned int s626_uint_to_reg(struct comedi_subdevice *s, int data){ */
/* return 0; */
/* } */
static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG)
{
struct comedi_device *dev = d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
comedi_cmd *cmd;
struct enc_private *k;
unsigned long flags;
}
/* TO COMPLETE, IF NECESSARY */
-static int s626_ai_insn_config(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
return -EINVAL;
}
-/* static int s626_ai_rinsn(struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data) */
+/* static int s626_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) */
/* { */
/* register uint8_t i; */
/* register int32_t *readaddr; */
/* return i; */
/* } */
-static int s626_ai_insn_read(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
uint16_t chan = CR_CHAN(insn->chanspec);
return n;
}
-static int s626_ai_inttrig(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int trignum)
{
if (trignum != 0)
}
/* TO COMPLETE */
-static int s626_ai_cmd(struct comedi_device *dev, comedi_subdevice *s)
+static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
uint8_t ppl[16];
return 0;
}
-static int s626_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd)
{
int err = 0;
return 0;
}
-static int s626_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
+static int s626_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
/* Stop RPS program in case it is currently running. */
MC_DISABLE(P_MC1, MC1_ERPS1);
return divider - 1;
}
-static int s626_ao_winsn(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
return i;
}
-static int s626_ao_rinsn(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i;
static void s626_dio_init(struct comedi_device *dev)
{
uint16_t group;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
/* Prepare to treat writes to WRCapSel as capture disables. */
DEBIwrite(dev, LP_MISC1, MISC1_NOEDCAP);
* This allows packed reading/writing of the DIO channels. The comedi
* core can convert between insn_bits and insn_read/write */
-static int s626_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
return 2;
}
-static int s626_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
/* Now this function initializes the value of the counter (data[0])
and set the subdevice. To complete with trigger and interrupt
configuration */
-static int s626_enc_insn_config(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_enc_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
uint16_t Setup = (LOADSRC_INDX << BF_LOADSRC) | /* Preload upon */
return insn->n;
}
-static int s626_enc_insn_read(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_enc_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
return n;
}
-static int s626_enc_insn_write(struct comedi_device *dev, comedi_subdevice *s,
+static int s626_enc_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
num_names:sizeof(serial2002_boards) / sizeof(serial2002_board),
};
-static int serial2002_di_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int serial2002_di_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int serial2002_do_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int serial2002_do_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int serial2002_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int serial2002_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int serial2002_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
struct serial_data {
break;
}
if (c) {
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
const comedi_lrange **range_table_list = NULL;
unsigned int *maxdata_list;
int j, chan;
}
}
-static int serial2002_di_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int serial2002_di_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
return n;
}
-static int serial2002_do_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int serial2002_do_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
return n;
}
-static int serial2002_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
return n;
}
-static int serial2002_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
return n;
}
-static int serial2002_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
return n;
}
-static int serial2002_ei_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ei_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
static int serial2002_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
printk("comedi%d: serial2002: ", dev->minor);
dev->board_name = thisboard->name;
static int serial2002_detach(struct comedi_device * dev)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int i;
printk("comedi%d: serial2002: remove\n", dev->minor);
num_names:sizeof(skel_boards) / sizeof(skel_board),
};
-static int skel_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int skel_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int skel_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int skel_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int skel_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int skel_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int skel_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int skel_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int skel_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int skel_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int skel_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int skel_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd);
static int skel_ns_to_timer(unsigned int *ns, int round);
*/
static int skel_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
printk("comedi%d: skel: ", dev->minor);
* "instructions" read/write data in "one-shot" or "software-triggered"
* mode.
*/
-static int skel_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int skel_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i;
return n;
}
-static int skel_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
+static int skel_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
return *ns;
}
-static int skel_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
+static int skel_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int skel_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
+static int skel_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int skel_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
+static int skel_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return 2;
}
-static int skel_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
+static int skel_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
COMEDI_INITCLEANUP(driver_dnp);
static int dnp_dio_insn_bits(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
static int dnp_dio_insn_config(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
/* ------------------------------------------------------------------------- */
/* Attach is called by comedi core to configure the driver for a particular */
static int dnp_attach(struct comedi_device * dev, comedi_devconfig * it)
{
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
printk("comedi%d: dnp: ", dev->minor);
/* ------------------------------------------------------------------------- */
static int dnp_dio_insn_bits(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
/* ------------------------------------------------------------------------- */
static int dnp_dio_insn_config(struct comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
u8 register_buffer;
} unioxx5_subd_priv;
static int unioxx5_attach(struct comedi_device * dev, comedi_devconfig * it);
-static int unioxx5_subdev_write(struct comedi_device * dev, comedi_subdevice * subdev,
+static int unioxx5_subdev_write(struct comedi_device * dev, struct comedi_subdevice * subdev,
comedi_insn * insn, unsigned int * data);
-static int unioxx5_subdev_read(struct comedi_device * dev, comedi_subdevice * subdev,
+static int unioxx5_subdev_read(struct comedi_device * dev, struct comedi_subdevice * subdev,
comedi_insn * insn, unsigned int * data);
-static int unioxx5_insn_config(struct comedi_device * dev, comedi_subdevice * subdev,
+static int unioxx5_insn_config(struct comedi_device * dev, struct comedi_subdevice * subdev,
comedi_insn * insn, unsigned int * data);
static int unioxx5_detach(struct comedi_device * dev);
-static int __unioxx5_subdev_init(comedi_subdevice * subdev, int subdev_iobase,
+static int __unioxx5_subdev_init(struct comedi_subdevice * subdev, int subdev_iobase,
int minor);
static int __unioxx5_digital_write(unioxx5_subd_priv * usp, unsigned int * data,
int channel, int minor);
return 0;
}
-static int unioxx5_subdev_read(struct comedi_device * dev, comedi_subdevice * subdev,
+static int unioxx5_subdev_read(struct comedi_device * dev, struct comedi_subdevice * subdev,
comedi_insn * insn, unsigned int * data)
{
unioxx5_subd_priv *usp = subdev->private;
return 1;
}
-static int unioxx5_subdev_write(struct comedi_device * dev, comedi_subdevice * subdev,
+static int unioxx5_subdev_write(struct comedi_device * dev, struct comedi_subdevice * subdev,
comedi_insn * insn, unsigned int * data)
{
unioxx5_subd_priv *usp = subdev->private;
}
/* for digital modules only */
-static int unioxx5_insn_config(struct comedi_device * dev, comedi_subdevice * subdev,
+static int unioxx5_insn_config(struct comedi_device * dev, struct comedi_subdevice * subdev,
comedi_insn * insn, unsigned int * data)
{
int channel_offset, flags, channel = CR_CHAN(insn->chanspec), type;
static int unioxx5_detach(struct comedi_device * dev)
{
int i;
- comedi_subdevice *subdev;
+ struct comedi_subdevice *subdev;
unioxx5_subd_priv *usp;
for (i = 0; i < dev->n_subdevices; i++) {
}
/* initializing subdevice with given address */
-static int __unioxx5_subdev_init(comedi_subdevice * subdev, int subdev_iobase,
+static int __unioxx5_subdev_init(struct comedi_subdevice * subdev, int subdev_iobase,
int minor)
{
unioxx5_subd_priv *usp;
* This will cancel a running acquisition operation.
* This is called by comedi but never from inside the driver.
*/
-static int usbdux_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
+static int usbdux_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
struct usbduxsub *this_usbduxsub;
int res = 0;
int i, err, n;
struct usbduxsub *this_usbduxsub;
struct comedi_device *this_comedidev;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
/* the context variable points to the subdevice */
this_comedidev = urb->context;
}
/* force unlink, is called by comedi */
-static int usbdux_ao_cancel(struct comedi_device *dev, comedi_subdevice *s)
+static int usbdux_ao_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
struct usbduxsub *this_usbduxsub = dev->private;
int res = 0;
int8_t *datap;
struct usbduxsub *this_usbduxsub;
struct comedi_device *this_comedidev;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
/* the context variable points to the subdevice */
this_comedidev = urb->context;
return 0;
}
-static int usbdux_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd)
{
int err = 0, tmp, i;
return -EFAULT;
}
-static int usbdux_ai_inttrig(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ai_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int trignum)
{
int ret;
return 1;
}
-static int usbdux_ai_cmd(struct comedi_device *dev, comedi_subdevice *s)
+static int usbdux_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int chan, range;
}
/* Mode 0 is used to get a single conversion on demand */
-static int usbdux_ai_insn_read(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i;
/************************************/
/* analog out */
-static int usbdux_ao_insn_read(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i;
return i;
}
-static int usbdux_ao_insn_write(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i, err;
return i;
}
-static int usbdux_ao_inttrig(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ao_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int trignum)
{
int ret;
return 1;
}
-static int usbdux_ao_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd)
{
int err = 0, tmp;
return 0;
}
-static int usbdux_ao_cmd(struct comedi_device *dev, comedi_subdevice *s)
+static int usbdux_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int chan, gain;
return 0;
}
-static int usbdux_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
return insn->n;
}
-static int usbdux_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
}
/* reads the 4 counters, only two are used just now */
-static int usbdux_counter_read(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_counter_read(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
return 1;
}
-static int usbdux_counter_write(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_counter_write(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
return 1;
}
-static int usbdux_counter_config(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_counter_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
/* nothing to do so far */
}
/* force unlink - is called by comedi */
-static int usbdux_pwm_cancel(struct comedi_device *dev, comedi_subdevice *s)
+static int usbdux_pwm_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
struct usbduxsub *this_usbduxsub = dev->private;
int res = 0;
int ret;
struct usbduxsub *this_usbduxsub;
struct comedi_device *this_comedidev;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
/* printk(KERN_DEBUG "PWM: IRQ\n"); */
return 0;
}
-static int usbdux_pwm_period(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_pwm_period(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int period)
{
struct usbduxsub *this_usbduxsub = dev->private;
}
/* is called from insn so there's no need to do all the sanity checks */
-static int usbdux_pwm_start(struct comedi_device *dev, comedi_subdevice *s)
+static int usbdux_pwm_start(struct comedi_device *dev, struct comedi_subdevice *s)
{
int ret, i;
struct usbduxsub *this_usbduxsub = dev->private;
}
/* generates the bit pattern for PWM with the optional sign bit */
-static int usbdux_pwm_pattern(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_pwm_pattern(struct comedi_device *dev, struct comedi_subdevice *s,
int channel, unsigned int value, unsigned int sign)
{
struct usbduxsub *this_usbduxsub = dev->private;
return 1;
}
-static int usbdux_pwm_write(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_pwm_write(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
data[0], 0);
}
-static int usbdux_pwm_read(struct comedi_device *x1, comedi_subdevice *x2,
+static int usbdux_pwm_read(struct comedi_device *x1, struct comedi_subdevice *x2,
comedi_insn *x3, unsigned int *x4)
{
/* not needed */
};
/* switches on/off PWM */
-static int usbdux_pwm_config(struct comedi_device *dev, comedi_subdevice *s,
+static int usbdux_pwm_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
int i;
struct usbduxsub *udev;
- comedi_subdevice *s = NULL;
+ struct comedi_subdevice *s = NULL;
dev->private = NULL;
down(&start_stop_sem);
* This will cancel a running acquisition operation.
* This is called by comedi but never from inside the driver.
*/
-static int usbduxfast_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
+static int usbduxfast_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
struct usbduxfastsub_s *udfs;
int ret;
int n, err;
struct usbduxfastsub_s *udfs;
struct comedi_device *this_comedidev;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
uint16_t *p;
/* sanity checks - is the urb there? */
}
static int usbduxfast_ai_cmdtest(struct comedi_device *dev,
- comedi_subdevice *s, comedi_cmd *cmd)
+ struct comedi_subdevice *s, comedi_cmd *cmd)
{
int err = 0, stop_mask = 0;
long int steps, tmp;
}
static int usbduxfast_ai_inttrig(struct comedi_device *dev,
- comedi_subdevice *s, unsigned int trignum)
+ struct comedi_subdevice *s, unsigned int trignum)
{
int ret;
struct usbduxfastsub_s *udfs = dev->private;
#define OUTBASE (1+0x10)
#define LOGBASE (1+0x18)
-static int usbduxfast_ai_cmd(struct comedi_device *dev, comedi_subdevice *s)
+static int usbduxfast_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int chan, gain, rngmask = 0xff;
* Mode 0 is used to get a single conversion on demand.
*/
static int usbduxfast_ai_insn_read(struct comedi_device *dev,
- comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int i, j, n, actual_length;
int chan, range, rngmask;
int ret;
int index;
int i;
- comedi_subdevice *s = NULL;
+ struct comedi_subdevice *s = NULL;
dev->private = NULL;
down(&start_stop_sem);
int comedi_get_subdevice_type(void *d, unsigned int subdevice)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
return s->type;
}
unsigned int comedi_get_subdevice_flags(void *d, unsigned int subdevice)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
return s->subdev_flags;
}
int comedi_get_n_channels(void *d, unsigned int subdevice)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
return s->n_chan;
}
int comedi_get_len_chanlist(void *d, unsigned int subdevice)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
return s->len_chanlist;
}
unsigned int chan)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
if (s->maxdata_list)
return s->maxdata_list[chan];
unsigned int chan)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
int ret;
if (s->range_table_list) {
int comedi_get_n_ranges(void *d, unsigned int subdevice, unsigned int chan)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
int ret;
if (s->range_table_list) {
unsigned int range, comedi_krange *krange)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
const comedi_lrange *lr;
if (s->range_table_list) {
unsigned int comedi_get_buf_head_pos(void *d, unsigned int subdevice)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
async = s->async;
int comedi_get_buffer_contents(void *d, unsigned int subdevice)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
unsigned int num_bytes;
unsigned int buf_user_count)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
int num_bytes;
unsigned int num_bytes)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
if (subdevice >= dev->n_subdevices)
unsigned int num_bytes)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
int bytes_written;
int comedi_get_buffer_size(void *d, unsigned int subdev)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdev;
+ struct comedi_subdevice *s = dev->subdevices + subdev;
comedi_async *async;
if (subdev >= dev->n_subdevices)
int comedi_get_buffer_offset(void *d, unsigned int subdevice)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices + subdevice;
+ struct comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
if (subdevice >= dev->n_subdevices)
int comedi_command(void *d, comedi_cmd *cmd)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
comedi_async *async;
unsigned runflags;
int comedi_command_test(void *d, comedi_cmd *cmd)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
if (cmd->subdev >= dev->n_subdevices)
return -ENODEV;
int comedi_do_insn(void *d, comedi_insn *insn)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret = 0;
if (insn->insn & INSN_MASK_SPECIAL) {
int comedi_lock(void *d, unsigned int subdevice)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long flags;
int ret = 0;
int comedi_unlock(void *d, unsigned int subdevice)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
unsigned long flags;
comedi_async *async;
int ret;
int comedi_cancel(void *d, unsigned int subdevice)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
int ret = 0;
if (subdevice >= dev->n_subdevices)
unsigned int mask, int (*cb) (unsigned int, void *), void *arg)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
comedi_async *async;
if (subdevice >= dev->n_subdevices)
int comedi_poll(void *d, unsigned int subdevice)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s = dev->subdevices;
+ struct comedi_subdevice *s = dev->subdevices;
comedi_async *async;
if (subdevice >= dev->n_subdevices)
int comedi_map(void *d, unsigned int subdevice, void *ptr)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
if (subdevice >= dev->n_subdevices)
return -EINVAL;
int comedi_unmap(void *d, unsigned int subdevice)
{
struct comedi_device *dev = (struct comedi_device *) d;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
if (subdevice >= dev->n_subdevices)
return -EINVAL;
comedi_rangeinfo it;
int subd, chan;
const comedi_lrange *lr;
- comedi_subdevice *s;
+ struct comedi_subdevice *s;
if (copy_from_user(&it, arg, sizeof(comedi_rangeinfo)))
return -EFAULT;
return 0;
}
-static int aref_invalid(comedi_subdevice *s, unsigned int chanspec)
+static int aref_invalid(struct comedi_subdevice *s, unsigned int chanspec)
{
unsigned int aref;
This function checks each element in a channel/gain list to make
make sure it is valid.
*/
-int check_chanlist(comedi_subdevice *s, int n, unsigned int *chanlist)
+int check_chanlist(struct comedi_subdevice *s, int n, unsigned int *chanlist)
{
int i;
int chan;