mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-08 13:44:01 +08:00
Staging: comedi: Remove comedi_subdevice typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
71b5f4f119
commit
34c43922e6
@ -86,8 +86,8 @@ static int do_insnlist_ioctl(struct comedi_device *dev, void *arg, void *file);
|
||||
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);
|
||||
|
||||
@ -276,7 +276,7 @@ static int do_bufconfig_ioctl(struct comedi_device *dev, void *arg)
|
||||
{
|
||||
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)))
|
||||
@ -367,9 +367,9 @@ static int do_devinfo_ioctl(struct comedi_device *dev, comedi_devinfo *arg,
|
||||
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));
|
||||
@ -415,7 +415,7 @@ static int do_subdinfo_ioctl(struct comedi_device *dev, comedi_subdinfo *arg,
|
||||
{
|
||||
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)
|
||||
@ -492,7 +492,7 @@ static int do_subdinfo_ioctl(struct comedi_device *dev, comedi_subdinfo *arg,
|
||||
*/
|
||||
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)))
|
||||
@ -557,7 +557,7 @@ static int do_chaninfo_ioctl(struct comedi_device *dev, comedi_chaninfo *arg)
|
||||
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)))
|
||||
@ -760,7 +760,7 @@ static int check_insn_config_length(comedi_insn *insn, unsigned int *data)
|
||||
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;
|
||||
|
||||
@ -978,7 +978,7 @@ error:
|
||||
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;
|
||||
@ -1132,7 +1132,7 @@ cleanup:
|
||||
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;
|
||||
@ -1231,7 +1231,7 @@ static int do_lock_ioctl(struct comedi_device *dev, unsigned int arg, void *file
|
||||
{
|
||||
int ret = 0;
|
||||
unsigned long flags;
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
|
||||
if (arg >= dev->n_subdevices)
|
||||
return -EINVAL;
|
||||
@ -1273,7 +1273,7 @@ static int do_lock_ioctl(struct comedi_device *dev, unsigned int arg, void *file
|
||||
*/
|
||||
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;
|
||||
@ -1313,7 +1313,7 @@ static int do_unlock_ioctl(struct comedi_device *dev, unsigned int arg, void *fi
|
||||
*/
|
||||
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;
|
||||
@ -1349,7 +1349,7 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg, void *fi
|
||||
*/
|
||||
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;
|
||||
@ -1370,7 +1370,7 @@ static int do_poll_ioctl(struct comedi_device *dev, unsigned int arg, void *file
|
||||
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;
|
||||
|
||||
@ -1411,7 +1411,7 @@ static int comedi_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
int n_pages;
|
||||
int i;
|
||||
int retval;
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
|
||||
mutex_lock(&dev->mutex);
|
||||
if (!dev->attached) {
|
||||
@ -1481,8 +1481,8 @@ static unsigned int comedi_poll(struct file *file, poll_table *wait)
|
||||
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) {
|
||||
@ -1523,7 +1523,7 @@ static unsigned int comedi_poll(struct file *file, poll_table *wait)
|
||||
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);
|
||||
@ -1625,7 +1625,7 @@ done:
|
||||
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);
|
||||
@ -1733,7 +1733,7 @@ done:
|
||||
/*
|
||||
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;
|
||||
|
||||
@ -1833,7 +1833,7 @@ static int comedi_close(struct inode *inode, struct file *file)
|
||||
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);
|
||||
@ -2006,7 +2006,7 @@ void comedi_error(const struct comedi_device *dev, const char *s)
|
||||
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;
|
||||
@ -2067,7 +2067,7 @@ void comedi_event(struct comedi_device *dev, comedi_subdevice *s)
|
||||
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;
|
||||
@ -2078,7 +2078,7 @@ void comedi_set_subdevice_runflags(comedi_subdevice *s, unsigned mask,
|
||||
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;
|
||||
@ -2091,7 +2091,7 @@ unsigned comedi_get_subdevice_runflags(comedi_subdevice *s)
|
||||
|
||||
static int is_device_busy(struct comedi_device *dev)
|
||||
{
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
int i;
|
||||
|
||||
if (!dev->attached)
|
||||
@ -2193,7 +2193,7 @@ void comedi_free_board_minor(unsigned minor)
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
@ -2231,7 +2231,7 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev, comedi_subdevice *s)
|
||||
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;
|
||||
|
@ -121,7 +121,6 @@
|
||||
#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;
|
||||
@ -131,7 +130,7 @@ typedef struct device device_create_result_type;
|
||||
#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;
|
||||
@ -162,27 +161,27 @@ struct comedi_subdevice_struct {
|
||||
|
||||
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;
|
||||
|
||||
@ -198,7 +197,7 @@ struct comedi_buf_page {
|
||||
};
|
||||
|
||||
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 */
|
||||
@ -237,7 +236,7 @@ struct comedi_async_struct {
|
||||
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);
|
||||
};
|
||||
|
||||
@ -277,14 +276,14 @@ struct comedi_device {
|
||||
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;
|
||||
|
||||
@ -294,8 +293,8 @@ struct comedi_device {
|
||||
|
||||
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
|
||||
@ -308,7 +307,7 @@ static const int 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
|
||||
@ -323,7 +322,7 @@ static const unsigned COMEDI_SUBDEVICE_MINOR_OFFSET = 1;
|
||||
|
||||
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)
|
||||
@ -333,7 +332,7 @@ static inline comedi_subdevice *comedi_get_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)
|
||||
@ -353,7 +352,7 @@ void cleanup_polling(void);
|
||||
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
|
||||
@ -383,11 +382,11 @@ enum subdevice_runflags {
|
||||
*/
|
||||
|
||||
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 */
|
||||
@ -428,7 +427,7 @@ static inline int alloc_subdevices(struct comedi_device *dev,
|
||||
|
||||
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) {
|
||||
@ -448,7 +447,7 @@ static inline int alloc_private(struct comedi_device *dev, int size)
|
||||
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);
|
||||
@ -523,8 +522,8 @@ static inline void *comedi_aux_data(int options[], int n)
|
||||
|
||||
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 */
|
||||
|
@ -48,12 +48,12 @@
|
||||
#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;
|
||||
@ -66,7 +66,7 @@ int comedi_modprobe(int minor)
|
||||
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++) {
|
||||
@ -227,7 +227,7 @@ int comedi_driver_unregister(comedi_driver *driver)
|
||||
static int postconfig(struct comedi_device *dev)
|
||||
{
|
||||
int i;
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
comedi_async *async = NULL;
|
||||
int ret;
|
||||
|
||||
@ -331,18 +331,18 @@ void comedi_report_boards(comedi_driver *driv)
|
||||
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;
|
||||
@ -412,7 +412,7 @@ static inline unsigned long kvirt_to_kva(unsigned long adr)
|
||||
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;
|
||||
@ -538,7 +538,7 @@ int comedi_buf_alloc(struct comedi_device *dev, comedi_subdevice *s,
|
||||
* 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);
|
||||
|
||||
|
@ -116,9 +116,9 @@ static comedi_driver driver_8255 = {
|
||||
|
||||
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;
|
||||
|
||||
@ -143,7 +143,7 @@ static int subdev_8255_cb(int dir, int port, int data, unsigned long arg)
|
||||
}
|
||||
}
|
||||
|
||||
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]) {
|
||||
@ -168,7 +168,7 @@ static int subdev_8255_insn(struct comedi_device *dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -205,7 +205,7 @@ static int subdev_8255_insn_config(struct comedi_device *dev, comedi_subdevice *
|
||||
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;
|
||||
|
||||
@ -222,7 +222,7 @@ static void do_config(struct comedi_device *dev, comedi_subdevice * s)
|
||||
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;
|
||||
@ -297,21 +297,21 @@ static int subdev_8255_cmdtest(struct comedi_device *dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -340,7 +340,7 @@ int subdev_8255_init(struct comedi_device *dev, comedi_subdevice * s, int (*cb)
|
||||
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;
|
||||
@ -358,7 +358,7 @@ int subdev_8255_init_irq(struct comedi_device *dev, comedi_subdevice * s,
|
||||
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) {
|
||||
@ -420,7 +420,7 @@ static int dev_8255_detach(struct comedi_device *dev)
|
||||
{
|
||||
int i;
|
||||
unsigned long iobase;
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
|
||||
printk("comedi%d: 8255: remove\n", dev->minor);
|
||||
|
||||
|
@ -28,16 +28,16 @@
|
||||
|
||||
#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");
|
||||
@ -48,7 +48,7 @@ static inline int subdev_8255_init(struct comedi_device * dev, comedi_subdevice
|
||||
}
|
||||
|
||||
static inline void subdev_8255_cleanup(struct comedi_device * dev,
|
||||
comedi_subdevice * s)
|
||||
struct comedi_subdevice * s)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ static comedi_driver driver_acl7225b = {
|
||||
|
||||
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)
|
||||
@ -71,7 +71,7 @@ static int acl7225b_do_insn(struct comedi_device *dev, comedi_subdevice * s,
|
||||
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)
|
||||
@ -85,7 +85,7 @@ static int acl7225b_di_insn(struct comedi_device *dev, comedi_subdevice * s,
|
||||
|
||||
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];
|
||||
|
@ -32,7 +32,7 @@
|
||||
| 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)
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -219,7 +219,7 @@ INT i_InsnConfig_InitTimer(struct comedi_device *dev,comedi_subdevice *s,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@ -406,7 +406,7 @@ INT i_APCI1710_InsnConfigInitTimer(struct comedi_device * dev, comedi_subdevice
|
||||
| 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 |
|
||||
@ -449,7 +449,7 @@ i_ReturnValue=insn->n;
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -561,7 +561,7 @@ INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device * dev,
|
||||
| (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 |
|
||||
@ -590,7 +590,7 @@ INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev,comedi_subdevice
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -669,7 +669,7 @@ INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -681,7 +681,7 @@ 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)
|
||||
{
|
||||
BYTE b_BitsType;
|
||||
|
@ -34,20 +34,20 @@
|
||||
/*
|
||||
* 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);
|
||||
|
||||
/*
|
||||
|
@ -131,7 +131,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -791,7 +791,7 @@ INT i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, comedi_subdevice
|
||||
| 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 |
|
||||
@ -841,7 +841,7 @@ comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -1077,7 +1077,7 @@ INT i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device * dev,
|
||||
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -1090,7 +1090,7 @@ comedi_insn *insn,unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -1757,7 +1757,7 @@ INT i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
|
||||
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -1877,7 +1877,7 @@ INT i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
|
@ -35,18 +35,18 @@
|
||||
/*
|
||||
* 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,
|
||||
@ -70,5 +70,5 @@ INT i_APCI1710_ConvertChronoValue(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);
|
||||
|
@ -62,7 +62,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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|
|
||||
@ -99,7 +99,7 @@ Activates and deactivates the digital output memory.
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -294,7 +294,7 @@ INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device * dev, comedi_subdevice
|
||||
//
|
||||
// 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;
|
||||
@ -446,7 +446,7 @@ INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -482,7 +482,7 @@ INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device * dev,
|
||||
// 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;
|
||||
@ -729,7 +729,7 @@ INT i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device * dev,
|
||||
// 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;
|
||||
|
@ -27,20 +27,20 @@
|
||||
/*
|
||||
* 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);
|
||||
|
@ -61,7 +61,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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)
|
||||
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -75,7 +75,7 @@ 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;
|
||||
@ -2002,7 +2002,7 @@ INT i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev,
|
||||
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -2015,7 +2015,7 @@ 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)
|
||||
{
|
||||
UINT ui_BitsType;
|
||||
@ -2939,7 +2939,7 @@ INT i_APCI1710_SetDigitalChlOff(struct comedi_device * dev, BYTE b_ModulNbr)
|
||||
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -2951,7 +2951,7 @@ comedi_insn *insn,unsigned int *data) |
|
||||
| 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;
|
||||
@ -4037,7 +4037,7 @@ INT i_APCI1710_DisableFrequencyMeasurement(struct comedi_device * dev, BYTE b_Mo
|
||||
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -4049,7 +4049,7 @@ comedi_insn *insn,unsigned int *data) |
|
||||
| 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;
|
||||
|
@ -132,16 +132,16 @@
|
||||
#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********/
|
||||
|
@ -124,7 +124,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -415,7 +415,7 @@ INT i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -709,7 +709,7 @@ INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device * dev,
|
||||
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;
|
||||
@ -835,7 +835,7 @@ INT i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device * dev,
|
||||
}
|
||||
|
||||
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.
|
||||
|
@ -22,11 +22,11 @@
|
||||
#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);
|
||||
|
||||
@ -34,7 +34,7 @@ INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device *dev,
|
||||
* 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);
|
||||
|
||||
@ -42,6 +42,6 @@ INT i_APCI1710_InsnReadInterruptPulseEncoder(struct comedi_device *dev,
|
||||
* 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);
|
||||
|
@ -58,7 +58,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -70,7 +70,7 @@ comedi_subdevice *s,comedi_insn *insn,unsigned int *data)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -1671,7 +1671,7 @@ INT i_APCI1710_GetPWMInitialisation(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -1683,7 +1683,7 @@ comedi_subdevice *s,comedi_insn *insn,unsigned int *data)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -3460,7 +3460,7 @@ INT i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -3562,7 +3562,7 @@ INT i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, comedi_subdevice
|
||||
}
|
||||
|
||||
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->
|
||||
|
@ -26,7 +26,7 @@
|
||||
#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,
|
||||
@ -50,7 +50,7 @@ INT i_APCI1710_GetPWMInitialisation(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,
|
||||
@ -68,9 +68,9 @@ INT i_APCI1710_SetNewPWMTiming(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);
|
||||
|
@ -133,7 +133,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -362,7 +362,7 @@ INT i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, comedi_subdevice *
|
||||
| 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 :
|
||||
@ -400,7 +400,7 @@ pul_Position = (PULONG) &data[0];
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -735,7 +735,7 @@ INT i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, comedi_subdevice * s
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
|
@ -33,11 +33,11 @@
|
||||
/*
|
||||
* 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);
|
||||
|
@ -131,7 +131,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -988,7 +988,7 @@ INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -1461,7 +1461,7 @@ INT i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -1701,7 +1701,7 @@ INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
|
@ -36,22 +36,22 @@
|
||||
* 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);
|
||||
|
@ -100,7 +100,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -406,7 +406,7 @@ APCI1710_TTL_READCHANNEL
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -634,7 +634,7 @@ INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -656,7 +656,7 @@ INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, comedi_subdevice *
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -792,7 +792,7 @@ INT i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
|
||||
| (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 |
|
||||
@ -826,7 +826,7 @@ INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,comedi_subdev
|
||||
*/
|
||||
|
||||
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;
|
||||
|
@ -24,21 +24,21 @@
|
||||
/*
|
||||
* 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);
|
||||
|
@ -2561,7 +2561,7 @@ COMEDI_PCI_INITCLEANUP(driver_addi, addi_apci_tbl);
|
||||
|
||||
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];
|
||||
@ -3029,14 +3029,14 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG)
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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) |
|
||||
| |
|
||||
| |
|
||||
@ -3046,7 +3046,7 @@ 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)
|
||||
{
|
||||
WORD w_Data;
|
||||
|
@ -118,103 +118,103 @@ typedef struct {
|
||||
|
||||
/* 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;
|
||||
|
||||
@ -461,5 +461,5 @@ static int i_ADDI_Detach(struct comedi_device *dev);
|
||||
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);
|
||||
|
@ -58,7 +58,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
|
||||
void i_ADDI_AttachPCI1710(struct comedi_device * dev)
|
||||
{
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
int ret = 0;
|
||||
int n_subdevices = 9;
|
||||
|
||||
|
@ -58,7 +58,7 @@ INT i_Flag = 1;
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -109,7 +109,7 @@ INT i_Flag = 1;
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -254,7 +254,7 @@ INT i_APCI035_ConfigTimerWatchdog(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -279,7 +279,7 @@ INT i_APCI035_ConfigTimerWatchdog(struct comedi_device * dev, comedi_subdevice *
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -367,7 +367,7 @@ INT i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -391,7 +391,7 @@ INT i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device * dev,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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
|
||||
@ -427,13 +427,13 @@ INT i_APCI035_ReadTimerWatchdog(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -447,7 +447,7 @@ INT i_APCI035_ReadTimerWatchdog(struct comedi_device * dev, comedi_subdevice * s
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -466,7 +466,7 @@ INT i_APCI035_ConfigAnalogInput(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -484,7 +484,7 @@ INT i_APCI035_ConfigAnalogInput(struct comedi_device * dev, comedi_subdevice * s
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
|
@ -101,19 +101,19 @@ comedi_lrange range_apci035_ai = { 8, {
|
||||
|
||||
/* 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 */
|
||||
|
@ -59,7 +59,7 @@ UINT ui_InterruptStatus = 0;
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -84,7 +84,7 @@ UINT ui_InterruptStatus = 0;
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -128,7 +128,7 @@ INT i_APCI1032_ConfigDigitalInput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -144,7 +144,7 @@ INT i_APCI1032_ConfigDigitalInput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -166,7 +166,7 @@ INT i_APCI1032_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -183,7 +183,7 @@ INT i_APCI1032_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice *
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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];
|
||||
|
@ -47,13 +47,13 @@
|
||||
//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.....
|
||||
|
@ -61,7 +61,7 @@ int i_TimerCounter1Enabled = 0, i_TimerCounter2Enabled =
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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. |
|
||||
@ -138,7 +138,7 @@ int i_TimerCounter1Enabled = 0, i_TimerCounter2Enabled =
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -500,7 +500,7 @@ INT i_APCI1500_ConfigDigitalInputEvent(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -519,7 +519,7 @@ INT i_APCI1500_ConfigDigitalInputEvent(struct comedi_device * dev,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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 =
|
||||
@ -768,7 +768,7 @@ int i_APCI1500_StartStopInputEvent(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -784,7 +784,7 @@ int i_APCI1500_StartStopInputEvent(struct comedi_device * dev, comedi_subdevice
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -937,7 +937,7 @@ INT i_APCI1500_Initialisation(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -957,7 +957,7 @@ INT i_APCI1500_Initialisation(struct comedi_device * dev, comedi_subdevice * s,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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];
|
||||
@ -1015,7 +1015,7 @@ INT i_APCI1500_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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) |
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -1025,7 +1025,7 @@ INT i_APCI1500_ReadMoreDigitalInput(struct comedi_device * dev, comedi_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 |
|
||||
@ -1041,7 +1041,7 @@ INT i_APCI1500_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -1050,7 +1050,7 @@ int i_APCI1500_ConfigDigitalOutputErrorInterrupt(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -1067,7 +1067,7 @@ int i_APCI1500_ConfigDigitalOutputErrorInterrupt(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -1215,13 +1215,13 @@ INT i_APCI1500_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -1262,7 +1262,7 @@ INT i_APCI1500_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
@ -1835,13 +1835,13 @@ int i_APCI1500_ConfigCounterTimerWatchdog(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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
|
||||
@ -1861,7 +1861,7 @@ int i_APCI1500_ConfigCounterTimerWatchdog(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
|
||||
@ -2160,13 +2160,13 @@ int i_APCI1500_StartStopTriggerTimerCounterWatchdog(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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
|
||||
@ -2183,7 +2183,7 @@ int i_APCI1500_StartStopTriggerTimerCounterWatchdog(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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]) {
|
||||
@ -2351,13 +2351,13 @@ int i_APCI1500_ReadCounterTimerWatchdog(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
|
||||
@ -2370,7 +2370,7 @@ int i_APCI1500_ReadCounterTimerWatchdog(struct comedi_device * dev,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -2382,13 +2382,13 @@ int i_APCI1500_ReadInterruptMask(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
|
||||
@ -2401,7 +2401,7 @@ int i_APCI1500_ReadInterruptMask(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
|
@ -116,50 +116,50 @@ enum {
|
||||
};
|
||||
|
||||
/*----------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);
|
||||
|
@ -56,13 +56,13 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -73,7 +73,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -96,13 +96,13 @@ INT i_APCI1516_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -114,7 +114,7 @@ INT i_APCI1516_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice *
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@ -149,7 +149,7 @@ INT i_APCI1516_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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. |
|
||||
@ -157,7 +157,7 @@ INT i_APCI1516_ReadMoreDigitalInput(struct comedi_device * dev, comedi_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 |
|
||||
@ -171,7 +171,7 @@ INT i_APCI1516_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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];
|
||||
@ -181,13 +181,13 @@ int i_APCI1516_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -199,7 +199,7 @@ int i_APCI1516_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -341,13 +341,13 @@ INT i_APCI1516_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -359,7 +359,7 @@ INT i_APCI1516_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@ -401,13 +401,13 @@ INT i_APCI1516_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -419,7 +419,7 @@ INT i_APCI1516_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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) {
|
||||
@ -447,13 +447,13 @@ int i_APCI1516_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -465,7 +465,7 @@ int i_APCI1516_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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]) {
|
||||
@ -492,13 +492,13 @@ int i_APCI1516_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevi
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -510,7 +510,7 @@ int i_APCI1516_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevi
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
|
@ -38,26 +38,26 @@
|
||||
// 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
|
||||
|
@ -62,7 +62,7 @@ UINT ui_InterruptData, ui_Type;
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -86,7 +86,7 @@ UINT ui_InterruptData, ui_Type;
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -131,7 +131,7 @@ INT i_APCI1564_ConfigDigitalInput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -147,7 +147,7 @@ INT i_APCI1564_ConfigDigitalInput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -171,7 +171,7 @@ INT i_APCI1564_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -187,7 +187,7 @@ INT i_APCI1564_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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];
|
||||
@ -233,7 +233,7 @@ INT i_APCI1564_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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. |
|
||||
@ -255,7 +255,7 @@ INT i_APCI1564_ReadMoreDigitalInput(struct comedi_device * dev, comedi_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;
|
||||
@ -296,7 +296,7 @@ INT i_APCI1564_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -312,7 +312,7 @@ INT i_APCI1564_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -470,7 +470,7 @@ INT i_APCI1564_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -486,7 +486,7 @@ INT i_APCI1564_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -537,7 +537,7 @@ INT i_APCI1564_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -565,7 +565,7 @@ INT i_APCI1564_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -695,7 +695,7 @@ INT i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -719,7 +719,7 @@ INT i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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) {
|
||||
@ -795,7 +795,7 @@ INT i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -814,7 +814,7 @@ INT i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
|
||||
@ -878,7 +878,7 @@ INT i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -892,7 +892,7 @@ INT i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
|
@ -82,34 +82,34 @@
|
||||
|
||||
//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
|
||||
|
@ -59,7 +59,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function Name : INT i_APCI16XX_InsnConfigInitTTLIO |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -91,7 +91,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -252,7 +252,7 @@ int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function Name : INT i_APCI16XX_InsnBitsReadTTLIO |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -284,7 +284,7 @@ int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -412,7 +412,7 @@ int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function Name : INT i_APCI16XX_InsnReadTTLIOAllPortValue |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -431,7 +431,7 @@ int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -537,7 +537,7 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function Name : INT i_APCI16XX_InsnBitsWriteTTLIO |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -571,7 +571,7 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
|
@ -63,7 +63,7 @@ static const comedi_lrange range_apci16xx_ttl = { 12,
|
||||
*/
|
||||
|
||||
int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn,
|
||||
struct comedi_subdevice *s, comedi_insn *insn,
|
||||
unsigned int *data);
|
||||
|
||||
/*
|
||||
@ -73,11 +73,11 @@ int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev,
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
/*
|
||||
@ -87,7 +87,7 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
|
||||
*/
|
||||
|
||||
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);
|
||||
|
@ -56,7 +56,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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. |
|
||||
@ -75,7 +75,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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)) {
|
||||
@ -95,7 +95,7 @@ int i_APCI2016_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -111,7 +111,7 @@ int i_APCI2016_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -250,7 +250,7 @@ int i_APCI2016_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -266,7 +266,7 @@ int i_APCI2016_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -320,13 +320,13 @@ int i_APCI2016_BitsDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -337,7 +337,7 @@ int i_APCI2016_BitsDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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)
|
||||
{
|
||||
|
||||
@ -363,13 +363,13 @@ int i_APCI2016_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -380,7 +380,7 @@ int i_APCI2016_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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)
|
||||
{
|
||||
|
||||
@ -409,13 +409,13 @@ int i_APCI2016_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevi
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -427,7 +427,7 @@ int i_APCI2016_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevi
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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);
|
||||
|
@ -40,25 +40,25 @@
|
||||
// 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.....
|
||||
|
@ -57,7 +57,7 @@ UINT ui_InterruptData, ui_Type;
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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. |
|
||||
@ -79,7 +79,7 @@ UINT ui_InterruptData, ui_Type;
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -117,7 +117,7 @@ int i_APCI2032_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -134,7 +134,7 @@ int i_APCI2032_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -296,7 +296,7 @@ INT i_APCI2032_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -313,7 +313,7 @@ INT i_APCI2032_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -363,13 +363,13 @@ INT i_APCI2032_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -380,7 +380,7 @@ INT i_APCI2032_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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) {
|
||||
@ -403,13 +403,13 @@ INT i_APCI2032_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -421,7 +421,7 @@ INT i_APCI2032_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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]) {
|
||||
@ -448,13 +448,13 @@ int i_APCI2032_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevi
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -466,7 +466,7 @@ int i_APCI2032_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevi
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@ -530,7 +530,7 @@ void v_APCI2032_Interrupt(int irq, void *d)
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -544,7 +544,7 @@ void v_APCI2032_Interrupt(int irq, void *d)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
|
@ -55,22 +55,22 @@
|
||||
// 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.....
|
||||
|
@ -56,13 +56,13 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -73,7 +73,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -94,13 +94,13 @@ INT i_APCI2200_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -112,7 +112,7 @@ INT i_APCI2200_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice *
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@ -147,7 +147,7 @@ INT i_APCI2200_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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. |
|
||||
@ -155,7 +155,7 @@ INT i_APCI2200_ReadMoreDigitalInput(struct comedi_device * dev, comedi_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 |
|
||||
@ -169,7 +169,7 @@ INT i_APCI2200_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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];
|
||||
@ -179,13 +179,13 @@ int i_APCI2200_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -197,7 +197,7 @@ int i_APCI2200_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -336,13 +336,13 @@ INT i_APCI2200_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -354,7 +354,7 @@ INT i_APCI2200_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@ -400,13 +400,13 @@ INT i_APCI2200_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -418,7 +418,7 @@ INT i_APCI2200_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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) {
|
||||
@ -446,13 +446,13 @@ int i_APCI2200_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -464,7 +464,7 @@ int i_APCI2200_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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]) {
|
||||
@ -491,13 +491,13 @@ int i_APCI2200_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevi
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -509,7 +509,7 @@ int i_APCI2200_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevi
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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] =
|
||||
|
@ -36,25 +36,25 @@
|
||||
// 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
|
||||
|
@ -58,14 +58,14 @@ static UINT ui_Temp = 0;
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -74,7 +74,7 @@ static UINT ui_Temp = 0;
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -125,7 +125,7 @@ int i_APCI3120_InsnConfigAnalogInput(struct comedi_device * dev, comedi_subdevic
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -136,7 +136,7 @@ int i_APCI3120_InsnConfigAnalogInput(struct comedi_device * dev, comedi_subdevic
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Input Parameters : struct comedi_device *dev |
|
||||
| comedi_subdevice *s |
|
||||
| struct comedi_subdevice *s |
|
||||
| comedi_insn *insn |
|
||||
| unsigned int *data |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -145,7 +145,7 @@ int i_APCI3120_InsnConfigAnalogInput(struct comedi_device * dev, comedi_subdevic
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -394,14 +394,14 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -409,7 +409,7 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device * dev, comedi_subdevice
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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);
|
||||
@ -460,7 +460,7 @@ int i_APCI3120_StopCyclicAcquisition(struct comedi_device * dev, comedi_subdevic
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -468,7 +468,7 @@ int i_APCI3120_StopCyclicAcquisition(struct comedi_device * dev, comedi_subdevic
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Input Parameters : struct comedi_device *dev |
|
||||
| comedi_subdevice *s |
|
||||
| struct comedi_subdevice *s |
|
||||
| comedi_cmd *cmd |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Return Value :0 |
|
||||
@ -476,7 +476,7 @@ int i_APCI3120_StopCyclicAcquisition(struct comedi_device * dev, comedi_subdevic
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -617,7 +617,7 @@ int i_APCI3120_CommandTestAnalogInput(struct comedi_device * dev, comedi_subdevi
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function name : int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, |
|
||||
| comedi_subdevice *s) |
|
||||
| struct comedi_subdevice *s) |
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Task : Does asynchronous acquisition |
|
||||
@ -625,7 +625,7 @@ int i_APCI3120_CommandTestAnalogInput(struct comedi_device * dev, comedi_subdevi
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Input Parameters : struct comedi_device *dev |
|
||||
| comedi_subdevice *s |
|
||||
| struct comedi_subdevice *s |
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Return Value : |
|
||||
@ -633,7 +633,7 @@ int i_APCI3120_CommandTestAnalogInput(struct comedi_device * dev, comedi_subdevi
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
@ -690,7 +690,7 @@ int i_APCI3120_CommandAnalogInput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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. |
|
||||
@ -708,7 +708,7 @@ int i_APCI3120_CommandAnalogInput(struct comedi_device * dev, comedi_subdevice *
|
||||
*/
|
||||
|
||||
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 =
|
||||
@ -1275,7 +1275,7 @@ int i_APCI3120_Reset(struct comedi_device * dev)
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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) |
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -1286,7 +1286,7 @@ int i_APCI3120_Reset(struct comedi_device * dev)
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Input Parameters : struct comedi_device * dev |
|
||||
| comedi_subdevice * s |
|
||||
| struct comedi_subdevice * s |
|
||||
| int n_chan |
|
||||
unsigned int *chanlist
|
||||
char check
|
||||
@ -1296,7 +1296,7 @@ int i_APCI3120_Reset(struct comedi_device * dev)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -1428,7 +1428,7 @@ void v_APCI3120_Interrupt(int irq, void *d)
|
||||
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
|
||||
@ -1634,7 +1634,7 @@ void v_APCI3120_Interrupt(int irq, void *d)
|
||||
{
|
||||
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;
|
||||
@ -1657,7 +1657,7 @@ void v_APCI3120_Interrupt(int irq, void *d)
|
||||
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;
|
||||
@ -1699,7 +1699,7 @@ int i_APCI3120_InterruptHandleEos(struct comedi_device * dev)
|
||||
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;
|
||||
|
||||
@ -1879,7 +1879,7 @@ void v_APCI3120_InterruptDma(int irq, void *d)
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -1887,7 +1887,7 @@ void v_APCI3120_InterruptDma(int irq, void *d)
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Input Parameters : struct comedi_device *dev |
|
||||
| comedi_subdevice *s |
|
||||
| struct comedi_subdevice *s |
|
||||
| short *dma |
|
||||
| short *data,int n |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -1896,7 +1896,7 @@ void v_APCI3120_InterruptDma(int irq, void *d)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/*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;
|
||||
|
||||
@ -1926,7 +1926,7 @@ void v_APCI3120_InterruptDma(int irq, void *d)
|
||||
}
|
||||
*/
|
||||
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;
|
||||
@ -1945,14 +1945,14 @@ void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
| |
|
||||
@ -1967,7 +1967,7 @@ void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@ -2093,13 +2093,13 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
| |
|
||||
@ -2118,7 +2118,7 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, comedi_subdevice * s,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@ -2284,14 +2284,14 @@ int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
| |
|
||||
@ -2304,7 +2304,7 @@ int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, comedi_subdevice * s,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -2361,7 +2361,7 @@ int i_APCI3120_InsnReadTimer(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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) |
|
||||
| |
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -2369,7 +2369,7 @@ int i_APCI3120_InsnReadTimer(struct comedi_device * dev, comedi_subdevice * s,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Input Parameters : struct comedi_device *dev |
|
||||
| comedi_subdevice *s |
|
||||
| struct comedi_subdevice *s |
|
||||
| comedi_insn *insn |
|
||||
| unsigned int *data |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -2378,8 +2378,10 @@ int i_APCI3120_InsnReadTimer(struct comedi_device * dev, comedi_subdevice * s,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
@ -2404,7 +2406,7 @@ int i_APCI3120_InsnReadDigitalInput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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|
|
||||
@ -2412,7 +2414,7 @@ int i_APCI3120_InsnReadDigitalInput(struct comedi_device * dev, comedi_subdevice
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Input Parameters : struct comedi_device *dev |
|
||||
| comedi_subdevice *s |
|
||||
| struct comedi_subdevice *s |
|
||||
| comedi_insn *insn |
|
||||
| unsigned int *data |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -2420,7 +2422,7 @@ int i_APCI3120_InsnReadDigitalInput(struct comedi_device * dev, comedi_subdevice
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -2443,14 +2445,14 @@ int i_APCI3120_InsnBitsDigitalInput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -2460,7 +2462,7 @@ int i_APCI3120_InsnBitsDigitalInput(struct comedi_device * dev, comedi_subdevice
|
||||
*/
|
||||
|
||||
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)) {
|
||||
@ -2486,14 +2488,14 @@ int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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
|
||||
@ -2505,8 +2507,10 @@ int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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)) {
|
||||
|
||||
@ -2537,14 +2541,14 @@ int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device * dev, comedi_subdevic
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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
|
||||
@ -2556,8 +2560,10 @@ int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device * dev, comedi_subdevic
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -2618,14 +2624,14 @@ int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device * dev, comedi_subdevi
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -2634,8 +2640,10 @@ int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device * dev, comedi_subdevi
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
|
@ -178,19 +178,19 @@ typedef struct {
|
||||
// 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);
|
||||
@ -198,44 +198,44 @@ void v_APCI3120_InterruptDma(int irq, void *d);
|
||||
|
||||
// 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);
|
||||
|
@ -530,7 +530,7 @@ INT i_APCI3200_GetChannelCalibrationValue(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -550,7 +550,7 @@ INT i_APCI3200_GetChannelCalibrationValue(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -592,7 +592,7 @@ INT i_APCI3200_ReadDigitalInput(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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. |
|
||||
@ -608,7 +608,7 @@ INT i_APCI3200_ReadDigitalInput(struct comedi_device * dev, comedi_subdevice * s
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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)
|
||||
{
|
||||
|
||||
@ -629,13 +629,13 @@ int i_APCI3200_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -653,7 +653,7 @@ int i_APCI3200_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -746,7 +746,7 @@ INT i_APCI3200_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -766,7 +766,7 @@ INT i_APCI3200_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -807,13 +807,13 @@ INT i_APCI3200_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -874,7 +874,7 @@ INT i_APCI3200_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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)
|
||||
{
|
||||
|
||||
@ -1334,7 +1334,7 @@ INT i_APCI3200_ConfigAnalogInput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -1361,7 +1361,7 @@ INT i_APCI3200_ConfigAnalogInput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -1633,7 +1633,7 @@ INT i_APCI3200_ReadAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -1652,7 +1652,7 @@ INT i_APCI3200_ReadAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -1759,7 +1759,7 @@ INT i_APCI3200_Read1AnalogInputChannel(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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|
|
||||
@ -1895,7 +1895,7 @@ int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device * dev, UINT * dat
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -2030,7 +2030,7 @@ int i_APCI3200_ReadCalibrationGainValue(struct comedi_device * dev, UINT * data)
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -2150,7 +2150,7 @@ int i_APCI3200_ReadCJCValue(struct comedi_device * dev, unsigned int * data)
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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
|
||||
@ -2265,7 +2265,7 @@ int i_APCI3200_ReadCJCCalOffset(struct comedi_device * dev, unsigned int * data)
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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
|
||||
@ -2375,13 +2375,13 @@ int i_APCI3200_ReadCJCCalGain(struct comedi_device * dev, unsigned int * data)
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -2405,7 +2405,7 @@ int i_APCI3200_ReadCJCCalGain(struct comedi_device * dev, unsigned int * data)
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -2510,13 +2510,13 @@ INT i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -2530,7 +2530,7 @@ INT i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -2539,7 +2539,7 @@ INT i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -2547,7 +2547,7 @@ INT i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device * dev,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Input Parameters : struct comedi_device *dev |
|
||||
| comedi_subdevice *s |
|
||||
| struct comedi_subdevice *s |
|
||||
| comedi_cmd *cmd |
|
||||
| |
|
||||
|
|
||||
@ -2560,7 +2560,7 @@ INT i_APCI3200_InsnWriteReleaseAnalogInput(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)
|
||||
{
|
||||
|
||||
@ -2749,14 +2749,14 @@ int i_APCI3200_CommandTestAnalogInput(struct comedi_device * dev, comedi_subdevi
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -2764,7 +2764,7 @@ int i_APCI3200_CommandTestAnalogInput(struct comedi_device * dev, comedi_subdevi
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -2797,7 +2797,7 @@ int i_APCI3200_StopCyclicAcquisition(struct comedi_device * dev, comedi_subdevic
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function name : int i_APCI3200_CommandAnalogInput(struct comedi_device *dev, |
|
||||
| comedi_subdevice *s) |
|
||||
| struct comedi_subdevice *s) |
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Task : Does asynchronous acquisition |
|
||||
@ -2805,7 +2805,7 @@ int i_APCI3200_StopCyclicAcquisition(struct comedi_device * dev, comedi_subdevic
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
| Input Parameters : struct comedi_device *dev |
|
||||
| comedi_subdevice *s |
|
||||
| struct comedi_subdevice *s |
|
||||
| |
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -2814,7 +2814,7 @@ int i_APCI3200_StopCyclicAcquisition(struct comedi_device * dev, comedi_subdevic
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -3502,7 +3502,7 @@ void v_APCI3200_Interrupt(int irq, void *d)
|
||||
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;
|
||||
|
@ -154,22 +154,22 @@ typedef struct {
|
||||
|
||||
//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);
|
||||
@ -182,6 +182,6 @@ int i_APCI3200_ReadCJCValue(struct comedi_device *dev, unsigned int *data);
|
||||
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);
|
||||
|
@ -56,7 +56,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -73,7 +73,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -99,7 +99,7 @@ INT i_APCI3501_ReadDigitalInput(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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. |
|
||||
@ -121,7 +121,7 @@ INT i_APCI3501_ReadDigitalInput(struct comedi_device * dev, comedi_subdevice * s
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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)
|
||||
{
|
||||
|
||||
@ -142,13 +142,13 @@ int i_APCI3501_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -161,7 +161,7 @@ int i_APCI3501_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -232,7 +232,7 @@ INT i_APCI3501_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -248,7 +248,7 @@ INT i_APCI3501_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -275,13 +275,13 @@ INT i_APCI3501_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -298,7 +298,7 @@ INT i_APCI3501_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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],
|
||||
@ -316,13 +316,13 @@ INT i_APCI3501_ConfigAnalogOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -336,7 +336,7 @@ INT i_APCI3501_ConfigAnalogOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;;
|
||||
@ -386,7 +386,7 @@ INT i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -411,7 +411,7 @@ INT i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, comedi_subdevice *
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -489,7 +489,7 @@ INT i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -512,7 +512,7 @@ INT i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -592,7 +592,7 @@ int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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 |
|
||||
@ -614,7 +614,7 @@ int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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) {
|
||||
|
@ -55,37 +55,37 @@ comedi_lrange range_apci3501_ao = { 2, {
|
||||
// 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);
|
||||
|
@ -81,7 +81,7 @@ int i_APCI3XXX_TestConversionStarted(struct comedi_device * dev)
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function Name : INT i_APCI3XXX_AnalogInputConfigOperatingMode |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -106,7 +106,7 @@ int i_APCI3XXX_TestConversionStarted(struct comedi_device * dev)
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -275,7 +275,7 @@ int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function Name : INT i_APCI3XXX_InsnConfigAnalogInput |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -296,7 +296,7 @@ int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
@ -333,7 +333,7 @@ int i_APCI3XXX_InsnConfigAnalogInput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function Name : INT i_APCI3XXX_InsnReadAnalogInput |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -356,7 +356,7 @@ int i_APCI3XXX_InsnConfigAnalogInput(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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);
|
||||
@ -664,7 +664,7 @@ void v_APCI3XXX_Interrupt(int irq, void *d)
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function Name : INT i_APCI3XXX_InsnWriteAnalogOutput |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -685,7 +685,7 @@ void v_APCI3XXX_Interrupt(int irq, void *d)
|
||||
*/
|
||||
|
||||
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);
|
||||
@ -770,7 +770,7 @@ int i_APCI3XXX_InsnWriteAnalogOutput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function Name : INT i_APCI3XXX_InsnConfigInitTTLIO |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -792,7 +792,7 @@ int i_APCI3XXX_InsnWriteAnalogOutput(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -901,7 +901,7 @@ int i_APCI3XXX_InsnConfigInitTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function Name : INT i_APCI3XXX_InsnBitsTTLIO |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -920,7 +920,7 @@ int i_APCI3XXX_InsnConfigInitTTLIO(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -1058,7 +1058,7 @@ int i_APCI3XXX_InsnBitsTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function Name : INT i_APCI3XXX_InsnReadTTLIO |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -1075,7 +1075,7 @@ int i_APCI3XXX_InsnBitsTTLIO(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -1170,7 +1170,7 @@ int i_APCI3XXX_InsnReadTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function Name : INT i_APCI3XXX_InsnWriteTTLIO |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -1188,7 +1188,7 @@ int i_APCI3XXX_InsnReadTTLIO(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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);
|
||||
@ -1282,7 +1282,7 @@ int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function name :int i_APCI3XXX_InsnReadDigitalInput |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -1299,7 +1299,7 @@ int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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);
|
||||
@ -1341,7 +1341,7 @@ int i_APCI3XXX_InsnReadDigitalInput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function name :int i_APCI3XXX_InsnBitsDigitalInput |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -1357,7 +1357,7 @@ int i_APCI3XXX_InsnReadDigitalInput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -1392,7 +1392,7 @@ int i_APCI3XXX_InsnBitsDigitalInput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function name :int i_APCI3XXX_InsnBitsDigitalOutput |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -1410,7 +1410,7 @@ int i_APCI3XXX_InsnBitsDigitalInput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
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;
|
||||
@ -1488,7 +1488,7 @@ int i_APCI3XXX_InsnBitsDigitalOutput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function name :int i_APCI3XXX_InsnWriteDigitalOutput |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -1506,7 +1506,7 @@ int i_APCI3XXX_InsnBitsDigitalOutput(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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);
|
||||
@ -1564,7 +1564,7 @@ int i_APCI3XXX_InsnWriteDigitalOutput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
| Function name :int i_APCI3XXX_InsnReadDigitalOutput |
|
||||
| (struct comedi_device *dev, |
|
||||
| comedi_subdevice *s, |
|
||||
| struct comedi_subdevice *s, |
|
||||
| comedi_insn *insn, |
|
||||
| unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -1581,7 +1581,7 @@ int i_APCI3XXX_InsnWriteDigitalOutput(struct comedi_device * dev,
|
||||
*/
|
||||
|
||||
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);
|
||||
|
@ -127,13 +127,13 @@ pci6208_pci_setup(struct pci_dev *pci_dev, unsigned long *io_base_ptr,
|
||||
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);
|
||||
|
||||
/*
|
||||
@ -144,7 +144,7 @@ static int pci6208_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
*/
|
||||
static int pci6208_attach(struct comedi_device * dev, comedi_devconfig * it)
|
||||
{
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
int retval;
|
||||
unsigned long io_base;
|
||||
|
||||
@ -219,7 +219,7 @@ static int pci6208_detach(struct comedi_device * dev)
|
||||
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;
|
||||
@ -244,7 +244,7 @@ static int pci6208_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
|
||||
/* 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;
|
||||
@ -261,7 +261,7 @@ static int pci6208_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
* 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;
|
||||
@ -285,7 +285,7 @@ static int pci6208_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
// 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);
|
||||
|
@ -75,7 +75,7 @@ static comedi_driver driver_adl_pci7296 = {
|
||||
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;
|
||||
|
||||
|
@ -69,10 +69,10 @@ static comedi_driver driver_adl_pci7432 = {
|
||||
|
||||
/* 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);
|
||||
|
||||
/* */
|
||||
@ -80,7 +80,7 @@ static int adl_pci7432_do_insn_bits(struct comedi_device * dev, comedi_subdevice
|
||||
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");
|
||||
@ -164,7 +164,7 @@ static int adl_pci7432_detach(struct comedi_device * dev)
|
||||
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");
|
||||
@ -184,7 +184,7 @@ static int adl_pci7432_do_insn_bits(struct comedi_device * dev, comedi_subdevice
|
||||
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");
|
||||
|
@ -79,34 +79,34 @@ static comedi_driver driver_adl_pci8164 = {
|
||||
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");
|
||||
@ -208,7 +208,7 @@ static int adl_pci8164_detach(struct comedi_device * dev)
|
||||
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;
|
||||
@ -245,7 +245,7 @@ static int adl_pci8164_insn_read_msts(struct comedi_device * dev, comedi_subdevi
|
||||
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;
|
||||
@ -282,7 +282,7 @@ static int adl_pci8164_insn_read_ssts(struct comedi_device * dev, comedi_subdevi
|
||||
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;
|
||||
@ -319,7 +319,7 @@ static int adl_pci8164_insn_read_buf0(struct comedi_device * dev, comedi_subdevi
|
||||
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;
|
||||
@ -357,7 +357,7 @@ static int adl_pci8164_insn_read_buf1(struct comedi_device * dev, comedi_subdevi
|
||||
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;
|
||||
@ -395,7 +395,7 @@ static int adl_pci8164_insn_write_cmd(struct comedi_device * dev, comedi_subdevi
|
||||
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;
|
||||
@ -434,7 +434,7 @@ static int adl_pci8164_insn_write_otp(struct comedi_device * dev, comedi_subdevi
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@ -472,7 +472,7 @@ static int adl_pci8164_insn_write_buf0(struct comedi_device * dev,
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -267,7 +267,7 @@ TODO:
|
||||
|
||||
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 = {
|
||||
@ -527,7 +527,7 @@ static void pci9111_interrupt_source_set(struct comedi_device * dev,
|
||||
|
||||
#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
|
||||
|
||||
@ -558,7 +558,7 @@ static int pci9111_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
|
||||
|
||||
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;
|
||||
@ -758,7 +758,7 @@ pci9111_ai_do_cmd_test(struct comedi_device * dev,
|
||||
// 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;
|
||||
|
||||
@ -881,7 +881,7 @@ static int pci9111_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * subd
|
||||
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);
|
||||
@ -912,7 +912,7 @@ static void pci9111_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -1072,7 +1072,7 @@ static irqreturn_t pci9111_interrupt(int irq, void *p_device PT_REGS_ARG)
|
||||
#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;
|
||||
@ -1132,7 +1132,7 @@ static int pci9111_ai_insn_read(struct comedi_device * dev,
|
||||
|
||||
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;
|
||||
|
||||
@ -1149,7 +1149,7 @@ pci9111_ao_insn_write(struct comedi_device * dev,
|
||||
//
|
||||
|
||||
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;
|
||||
|
||||
@ -1171,7 +1171,7 @@ static int pci9111_ao_insn_read(struct comedi_device * dev,
|
||||
//
|
||||
|
||||
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;
|
||||
|
||||
@ -1186,7 +1186,7 @@ static int pci9111_di_insn_bits(struct comedi_device * dev,
|
||||
//
|
||||
|
||||
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;
|
||||
|
||||
@ -1248,7 +1248,7 @@ static int pci9111_reset(struct comedi_device * dev)
|
||||
|
||||
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;
|
||||
|
@ -288,7 +288,7 @@ typedef struct {
|
||||
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
|
||||
@ -308,9 +308,9 @@ typedef struct {
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
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,
|
||||
@ -318,16 +318,16 @@ static void start_pacer(struct comedi_device * dev, int mode, unsigned int divis
|
||||
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)
|
||||
{
|
||||
|
||||
@ -377,7 +377,7 @@ static int pci9118_insn_read_ai(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -400,7 +400,7 @@ static int pci9118_insn_write_ao(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -415,7 +415,7 @@ static int pci9118_insn_read_ao(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -426,7 +426,7 @@ static int pci9118_insn_bits_di(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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]) {
|
||||
@ -457,7 +457,7 @@ static void interrupt_pci9118_ai_mode4_switch(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
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,
|
||||
@ -481,7 +481,7 @@ static unsigned int defragment_dma_buffer(struct comedi_device * dev,
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
|
||||
@ -502,7 +502,7 @@ static unsigned int move_block_from_dma(struct comedi_device * dev,
|
||||
==============================================================================
|
||||
*/
|
||||
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!)");
|
||||
@ -531,7 +531,7 @@ static char pci9118_decode_error_status(struct comedi_device * dev,
|
||||
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);
|
||||
@ -552,7 +552,7 @@ static void pci9118_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -598,7 +598,7 @@ static void interrupt_pci9118_ai_onesample(struct comedi_device * dev,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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)
|
||||
{
|
||||
@ -727,7 +727,7 @@ static irqreturn_t interrupt_pci9118(int irq, void *d PT_REGS_ARG)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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)
|
||||
@ -751,7 +751,7 @@ static int pci9118_ai_inttrig(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -1163,7 +1163,7 @@ static int Compute_and_setup_dma(struct comedi_device * dev)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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);
|
||||
@ -1216,7 +1216,7 @@ static int pci9118_ai_docmd_sampl(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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);
|
||||
@ -1287,7 +1287,7 @@ static int pci9118_ai_docmd_dma(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -1486,7 +1486,7 @@ static int pci9118_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -1537,7 +1537,7 @@ static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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)
|
||||
{
|
||||
@ -1652,7 +1652,7 @@ static int setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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)
|
||||
{
|
||||
@ -1760,7 +1760,7 @@ 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)
|
||||
{
|
||||
if (devpriv->usedma)
|
||||
outl(inl(devpriv->iobase_a + AMCC_OP_REG_MCSR) & (~EN_A2P_TRANSFERS), devpriv->iobase_a + AMCC_OP_REG_MCSR); // stop DMA
|
||||
@ -1837,7 +1837,7 @@ static int pci9118_reset(struct comedi_device * dev)
|
||||
*/
|
||||
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;
|
||||
|
@ -174,9 +174,9 @@ static comedi_driver driver_adq12b={
|
||||
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
|
||||
@ -186,7 +186,7 @@ static int adq12b_do_insn_bits(struct comedi_device *dev,comedi_subdevice *s, co
|
||||
*/
|
||||
static int adq12b_attach(struct comedi_device *dev,comedi_devconfig *it)
|
||||
{
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase;
|
||||
int unipolar, differential;
|
||||
|
||||
@ -314,7 +314,7 @@ static int adq12b_detach(struct comedi_device *dev)
|
||||
* 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;
|
||||
@ -357,7 +357,7 @@ static int adq12b_ai_rinsn(struct comedi_device *dev,comedi_subdevice *s,comedi_
|
||||
}
|
||||
|
||||
|
||||
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 */
|
||||
@ -367,7 +367,7 @@ static int adq12b_di_insn_bits(struct comedi_device *dev,comedi_subdevice *s, c
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
|
||||
|
@ -304,14 +304,14 @@ typedef struct {
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
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,
|
||||
@ -322,7 +322,7 @@ static const unsigned int muxonechan[] = { 0x0000, 0x0101, 0x0202, 0x0303, 0x040
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -390,7 +390,7 @@ static int pci171x_insn_read_ai(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -421,7 +421,7 @@ static int pci171x_insn_write_ao(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -436,7 +436,7 @@ static int pci171x_insn_read_ao(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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);
|
||||
@ -447,7 +447,7 @@ static int pci171x_insn_bits_di(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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]) {
|
||||
@ -463,7 +463,7 @@ static int pci171x_insn_bits_do(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -485,7 +485,7 @@ static int pci171x_insn_counter_read(struct comedi_device * dev, comedi_subdevic
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -513,7 +513,7 @@ static int pci171x_insn_counter_write(struct comedi_device * dev, comedi_subdevi
|
||||
==============================================================================
|
||||
*/
|
||||
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 */
|
||||
@ -548,7 +548,7 @@ static int pci171x_insn_counter_config(struct comedi_device * dev,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -577,7 +577,7 @@ static int pci1720_insn_write_ao(struct comedi_device * dev, comedi_subdevice *
|
||||
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;
|
||||
@ -659,7 +659,7 @@ static void interrupt_pci1710_every_sample(void *d)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -708,7 +708,7 @@ static int move_block_from_fifo(struct comedi_device * dev, comedi_subdevice * s
|
||||
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");
|
||||
@ -802,7 +802,7 @@ static irqreturn_t interrupt_service_pci1710(int irq, void *d PT_REGS_ARG)
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -900,7 +900,7 @@ static void pci171x_cmdtest_out(int e, comedi_cmd * cmd)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -1065,7 +1065,7 @@ static int pci171x_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
|
||||
@ -1104,7 +1104,7 @@ static int pci171x_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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];
|
||||
@ -1163,7 +1163,7 @@ static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -1220,7 +1220,7 @@ static void start_pacer(struct comedi_device * dev, int mode, unsigned int divis
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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");
|
||||
|
||||
@ -1318,7 +1318,7 @@ static int pci1710_reset(struct comedi_device * dev)
|
||||
*/
|
||||
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;
|
||||
|
@ -202,7 +202,7 @@ static int pci1723_reset(struct comedi_device * dev)
|
||||
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;
|
||||
@ -218,7 +218,7 @@ static int pci1723_insn_read_ao(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
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;
|
||||
@ -238,7 +238,7 @@ static int pci1723_ao_write_winsn(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
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;
|
||||
@ -278,7 +278,7 @@ static int pci1723_dio_insn_config(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
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]) {
|
||||
@ -296,7 +296,7 @@ static int pci1723_dio_insn_bits(struct comedi_device * dev, comedi_subdevice *
|
||||
*/
|
||||
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;
|
||||
|
@ -357,7 +357,7 @@ static pci_dio_private *pci_priv = NULL; /* list of allocated cards */
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -374,7 +374,7 @@ static int pci_dio_insn_bits_di_b(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -390,7 +390,7 @@ static int pci_dio_insn_bits_di_w(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -411,7 +411,7 @@ static int pci_dio_insn_bits_do_b(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -490,7 +490,7 @@ static int pci1760_mbxrequest(struct comedi_device * dev,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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);
|
||||
@ -501,7 +501,7 @@ static int pci1760_insn_bits_di(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -528,7 +528,7 @@ static int pci1760_insn_bits_do(struct comedi_device * dev, comedi_subdevice * s
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -552,7 +552,7 @@ static int pci1760_insn_cnt_read(struct comedi_device * dev, comedi_subdevice *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -752,7 +752,7 @@ static int pci_dio_reset(struct comedi_device * dev)
|
||||
*/
|
||||
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;
|
||||
@ -802,7 +802,7 @@ static int pci1760_attach(struct comedi_device * dev, comedi_devconfig * it)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -829,7 +829,7 @@ static int pci_dio_add_di(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
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;
|
||||
@ -885,7 +885,7 @@ static int CheckAndAllocCard(struct comedi_device * dev, comedi_devconfig * it,
|
||||
*/
|
||||
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;
|
||||
@ -1014,7 +1014,7 @@ static int pci_dio_attach(struct comedi_device * dev, comedi_devconfig * it)
|
||||
static int pci_dio_detach(struct comedi_device * dev)
|
||||
{
|
||||
int i, j;
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
int subdev;
|
||||
|
||||
if (dev->private) {
|
||||
|
@ -88,7 +88,7 @@ typedef struct {
|
||||
|
||||
#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;
|
||||
@ -122,7 +122,7 @@ static int aio_aio12_8_ai_read(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -133,7 +133,7 @@ static int aio_aio12_8_ao_read(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -164,7 +164,7 @@ static const comedi_lrange range_aio_aio12_8 = {
|
||||
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")) {
|
||||
|
@ -82,15 +82,15 @@ static comedi_driver driver_aio_iiro_16 = {
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
@ -143,7 +143,7 @@ static int aio_iiro_16_detach(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
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;
|
||||
@ -162,7 +162,7 @@ static int aio_iiro_16_dio_insn_bits_write(struct comedi_device * dev,
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -572,7 +572,7 @@ dio200_request_region(unsigned minor, unsigned long from, unsigned long extent)
|
||||
* '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;
|
||||
@ -591,7 +591,7 @@ dio200_subdev_intr_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
* 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;
|
||||
|
||||
@ -605,7 +605,7 @@ static void dio200_stop_intr(struct comedi_device * dev, comedi_subdevice * s)
|
||||
/*
|
||||
* 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;
|
||||
@ -641,7 +641,7 @@ static int dio200_start_intr(struct comedi_device * dev, comedi_subdevice * s)
|
||||
* 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;
|
||||
@ -671,7 +671,7 @@ dio200_inttrig_start_intr(struct comedi_device * dev, comedi_subdevice * s,
|
||||
* 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;
|
||||
@ -783,7 +783,7 @@ static int dio200_handle_read_intr(struct comedi_device * dev, comedi_subdevice
|
||||
/*
|
||||
* '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;
|
||||
@ -801,7 +801,7 @@ static int dio200_subdev_intr_cancel(struct comedi_device * dev, comedi_subdevic
|
||||
* '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;
|
||||
@ -907,7 +907,7 @@ dio200_subdev_intr_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
* '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;
|
||||
@ -953,7 +953,7 @@ static int dio200_subdev_intr_cmd(struct comedi_device * dev, comedi_subdevice *
|
||||
* 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;
|
||||
@ -998,7 +998,7 @@ dio200_subdev_intr_init(struct comedi_device * dev, comedi_subdevice * s,
|
||||
* 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;
|
||||
|
||||
@ -1033,7 +1033,7 @@ static irqreturn_t dio200_interrupt(int irq, void *d PT_REGS_ARG)
|
||||
* 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;
|
||||
@ -1048,7 +1048,7 @@ dio200_subdev_8254_read(struct comedi_device * dev, comedi_subdevice * s,
|
||||
* 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;
|
||||
@ -1142,7 +1142,7 @@ dio200_get_clock_src(dio200_subdev_8254 * subpriv, unsigned int counter_number,
|
||||
* 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;
|
||||
@ -1194,7 +1194,7 @@ dio200_subdev_8254_config(struct comedi_device * dev, comedi_subdevice * s,
|
||||
* 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;
|
||||
@ -1247,7 +1247,7 @@ dio200_subdev_8254_init(struct comedi_device * dev, comedi_subdevice * s,
|
||||
* 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;
|
||||
|
||||
@ -1264,7 +1264,7 @@ dio200_subdev_8254_cleanup(struct comedi_device * dev, comedi_subdevice * s)
|
||||
*/
|
||||
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
|
||||
@ -1443,7 +1443,7 @@ static int dio200_detach(struct comedi_device * dev)
|
||||
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);
|
||||
|
@ -188,12 +188,12 @@ static int pc236_request_region(unsigned minor, unsigned long from,
|
||||
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);
|
||||
|
||||
/*
|
||||
@ -266,7 +266,7 @@ pc236_find_pci(struct comedi_device * dev, int bus, int slot,
|
||||
*/
|
||||
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
|
||||
@ -528,7 +528,7 @@ static int pc236_intr_check(struct comedi_device * dev)
|
||||
* 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;
|
||||
@ -539,7 +539,7 @@ static int pc236_intr_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
* 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;
|
||||
@ -617,7 +617,7 @@ static int pc236_intr_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
* 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);
|
||||
|
||||
@ -627,7 +627,7 @@ static int pc236_intr_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
/*
|
||||
* 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);
|
||||
|
||||
@ -641,7 +641,7 @@ static int pc236_intr_cancel(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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);
|
||||
|
@ -146,9 +146,9 @@ static comedi_driver driver_amplc_pc263 = {
|
||||
|
||||
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);
|
||||
|
||||
/*
|
||||
@ -221,7 +221,7 @@ pc263_find_pci(struct comedi_device * dev, int bus, int slot,
|
||||
*/
|
||||
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;
|
||||
@ -387,7 +387,7 @@ static int pc263_request_region(unsigned minor, unsigned long from,
|
||||
* 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)
|
||||
@ -412,7 +412,7 @@ static int pc263_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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)
|
||||
|
@ -477,7 +477,7 @@ pci224_ao_set_data(struct comedi_device * dev, int chan, int range, unsigned int
|
||||
* '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;
|
||||
@ -504,7 +504,7 @@ pci224_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
|
||||
* 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;
|
||||
@ -532,7 +532,7 @@ pci224_cascade_ns_to_timer(int osc_base, unsigned int *d1, unsigned int *d2,
|
||||
/*
|
||||
* 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;
|
||||
|
||||
@ -572,7 +572,7 @@ static void pci224_ao_stop(struct comedi_device * dev, comedi_subdevice * s)
|
||||
/*
|
||||
* 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;
|
||||
@ -599,7 +599,7 @@ static void pci224_ao_start(struct comedi_device * dev, comedi_subdevice * s)
|
||||
/*
|
||||
* 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;
|
||||
@ -728,7 +728,7 @@ static void pci224_ao_handle_fifo(struct comedi_device * dev, comedi_subdevice *
|
||||
* 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)
|
||||
@ -748,7 +748,7 @@ pci224_ao_inttrig_start(struct comedi_device * dev, comedi_subdevice * s,
|
||||
* '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;
|
||||
@ -1015,7 +1015,7 @@ pci224_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s, comedi_cmd *
|
||||
/*
|
||||
* '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;
|
||||
@ -1172,7 +1172,7 @@ static int pci224_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
/*
|
||||
* '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;
|
||||
@ -1182,7 +1182,7 @@ static int pci224_ao_cancel(struct comedi_device * dev, comedi_subdevice * s)
|
||||
* '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;
|
||||
@ -1215,7 +1215,7 @@ pci224_ao_munge(struct comedi_device * dev, comedi_subdevice * s, void *data,
|
||||
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;
|
||||
@ -1325,7 +1325,7 @@ pci224_find_pci(struct comedi_device * dev, int bus, int slot,
|
||||
*/
|
||||
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;
|
||||
@ -1511,7 +1511,7 @@ static int pci224_detach(struct comedi_device * dev)
|
||||
comedi_free_irq(dev->irq, dev);
|
||||
}
|
||||
if (dev->subdevices) {
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
|
||||
s = dev->subdevices + 0;
|
||||
/* AO subdevice */
|
||||
|
@ -615,30 +615,30 @@ static comedi_driver driver_amplc_pci230 = {
|
||||
|
||||
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)
|
||||
{
|
||||
@ -704,7 +704,7 @@ static inline void pci230_ao_write_fifo(struct comedi_device * dev, short datum,
|
||||
*/
|
||||
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;
|
||||
@ -1058,7 +1058,7 @@ static inline void put_all_resources(struct comedi_device * dev, unsigned char o
|
||||
/*
|
||||
* 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;
|
||||
@ -1163,7 +1163,7 @@ static int pci230_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
/*
|
||||
* 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;
|
||||
@ -1191,7 +1191,7 @@ static int pci230_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
|
||||
/* 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;
|
||||
@ -1203,7 +1203,7 @@ static int pci230_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -1417,7 +1417,7 @@ static int pci230_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@ -1448,7 +1448,7 @@ static int pci230_ao_inttrig_scan_begin(struct comedi_device * dev,
|
||||
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;
|
||||
@ -1536,7 +1536,7 @@ static void pci230_ao_start(struct comedi_device * dev, comedi_subdevice * s)
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
@ -1548,7 +1548,7 @@ static int pci230_ao_inttrig_start(struct comedi_device * dev, comedi_subdevice
|
||||
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;
|
||||
@ -1648,7 +1648,7 @@ static int pci230_ai_check_scan_period(comedi_cmd * cmd)
|
||||
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;
|
||||
@ -2035,7 +2035,7 @@ static int pci230_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
|
||||
}
|
||||
|
||||
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;
|
||||
@ -2078,7 +2078,7 @@ static void pci230_ai_update_fifo_trigger_level(struct comedi_device * dev,
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
@ -2122,7 +2122,7 @@ static int pci230_ai_inttrig_convert(struct comedi_device * dev, comedi_subdevic
|
||||
}
|
||||
|
||||
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;
|
||||
@ -2143,7 +2143,7 @@ static int pci230_ai_inttrig_scan_begin(struct comedi_device * dev,
|
||||
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;
|
||||
@ -2280,7 +2280,7 @@ static void pci230_ai_start(struct comedi_device * dev, comedi_subdevice * s)
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
@ -2292,7 +2292,7 @@ static int pci230_ai_inttrig_start(struct comedi_device * dev, comedi_subdevice
|
||||
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;
|
||||
@ -2563,7 +2563,7 @@ static irqreturn_t pci230_interrupt(int irq, void *d PT_REGS_ARG)
|
||||
{
|
||||
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. */
|
||||
@ -2622,7 +2622,7 @@ static irqreturn_t pci230_interrupt(int irq, void *d PT_REGS_ARG)
|
||||
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;
|
||||
@ -2659,7 +2659,7 @@ static void pci230_handle_ao_nofifo(struct comedi_device * dev, comedi_subdevice
|
||||
|
||||
/* 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;
|
||||
@ -2762,7 +2762,7 @@ static int pci230_handle_ao_fifo(struct comedi_device * dev, comedi_subdevice *
|
||||
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;
|
||||
@ -2861,7 +2861,7 @@ static void pci230_handle_ai(struct comedi_device * dev, comedi_subdevice * s)
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
@ -2916,13 +2916,13 @@ static void pci230_ao_stop(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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;
|
||||
@ -2970,7 +2970,7 @@ static void pci230_ai_stop(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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;
|
||||
|
@ -339,14 +339,14 @@ static void C6X_encResetAll(unsigned long baseAddr)
|
||||
}
|
||||
|
||||
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);
|
||||
@ -360,7 +360,7 @@ static int c6xdigio_pwmo_insn_write(struct comedi_device * dev,
|
||||
}
|
||||
|
||||
//static int c6xdigio_ei_init_insn_read(struct comedi_device *dev,
|
||||
// comedi_subdevice *s,
|
||||
// struct comedi_subdevice *s,
|
||||
// comedi_insn *insn,
|
||||
// unsigned int *data)
|
||||
//{
|
||||
@ -369,7 +369,7 @@ static int c6xdigio_pwmo_insn_write(struct comedi_device * dev,
|
||||
//}
|
||||
|
||||
//static int c6xdigio_ei_init_insn_write(struct comedi_device *dev,
|
||||
// comedi_subdevice *s,
|
||||
// struct comedi_subdevice *s,
|
||||
// comedi_insn *insn,
|
||||
// unsigned int *data)
|
||||
//{
|
||||
@ -382,7 +382,7 @@ static int c6xdigio_pwmo_insn_write(struct comedi_device * dev,
|
||||
//}
|
||||
|
||||
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;
|
||||
@ -433,7 +433,7 @@ static int c6xdigio_attach(struct comedi_device * dev, comedi_devconfig * it)
|
||||
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);
|
||||
|
@ -109,22 +109,22 @@ static const comedi_lrange das16cs_ai_range = { 4, {
|
||||
};
|
||||
|
||||
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)
|
||||
@ -168,7 +168,7 @@ static const das16cs_board *das16cs_probe(struct comedi_device * dev,
|
||||
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;
|
||||
|
||||
@ -286,7 +286,7 @@ static irqreturn_t das16cs_interrupt(int irq, void *d PT_REGS_ARG)
|
||||
* "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;
|
||||
@ -328,12 +328,12 @@ static int das16cs_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -489,7 +489,7 @@ static int das16cs_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -535,7 +535,7 @@ static int das16cs_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
|
||||
/* 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;
|
||||
@ -552,7 +552,7 @@ static int das16cs_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
* 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)
|
||||
@ -572,7 +572,7 @@ static int das16cs_dio_insn_bits(struct comedi_device * dev, comedi_subdevice *
|
||||
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);
|
||||
@ -610,13 +610,13 @@ static int das16cs_dio_insn_config(struct comedi_device * dev, comedi_subdevice
|
||||
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;
|
||||
|
@ -449,46 +449,46 @@ static comedi_driver driver_cb_pcidas = {
|
||||
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);
|
||||
@ -509,7 +509,7 @@ static inline unsigned int cal_enable_bits(struct comedi_device * dev)
|
||||
*/
|
||||
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;
|
||||
@ -752,7 +752,7 @@ static int cb_pcidas_detach(struct comedi_device * dev)
|
||||
* "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;
|
||||
@ -819,7 +819,7 @@ static int ai_config_calibration_source(struct comedi_device * dev, unsigned int
|
||||
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];
|
||||
@ -836,7 +836,7 @@ static int ai_config_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
}
|
||||
|
||||
// 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;
|
||||
@ -861,7 +861,7 @@ static int cb_pcidas_ao_nofifo_winsn(struct comedi_device * dev, comedi_subdevic
|
||||
}
|
||||
|
||||
// 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;
|
||||
@ -892,7 +892,7 @@ static int cb_pcidas_ao_fifo_winsn(struct comedi_device * dev, comedi_subdevice
|
||||
|
||||
// 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)];
|
||||
@ -900,7 +900,7 @@ static int cb_pcidas_ao_readback_insn(struct comedi_device * dev, comedi_subdevi
|
||||
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;
|
||||
@ -915,7 +915,7 @@ static int eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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);
|
||||
@ -923,7 +923,7 @@ static int caldac_write_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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)];
|
||||
@ -952,13 +952,13 @@ static int dac08_write(struct comedi_device * dev, unsigned int value)
|
||||
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;
|
||||
@ -989,7 +989,7 @@ static int cb_pcidas_trimpot_write(struct comedi_device * dev,
|
||||
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);
|
||||
@ -997,7 +997,7 @@ static int trimpot_write_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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);
|
||||
@ -1007,7 +1007,7 @@ static int trimpot_read_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -1162,7 +1162,7 @@ static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s
|
||||
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;
|
||||
@ -1249,7 +1249,7 @@ static int cb_pcidas_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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;
|
||||
@ -1362,7 +1362,7 @@ static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s
|
||||
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;
|
||||
@ -1425,7 +1425,7 @@ static int cb_pcidas_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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;
|
||||
@ -1477,7 +1477,7 @@ static int cb_pcidas_ao_inttrig(struct comedi_device * dev, comedi_subdevice * s
|
||||
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;
|
||||
@ -1588,7 +1588,7 @@ 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)
|
||||
{
|
||||
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;
|
||||
@ -1643,7 +1643,7 @@ static void handle_ao_interrupt(struct comedi_device * dev, unsigned int status)
|
||||
}
|
||||
|
||||
// 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;
|
||||
|
||||
@ -1662,7 +1662,7 @@ static int cb_pcidas_cancel(struct comedi_device * dev, comedi_subdevice * s)
|
||||
}
|
||||
|
||||
// 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;
|
||||
|
||||
|
@ -1134,46 +1134,46 @@ static comedi_driver driver_cb_pcidas = {
|
||||
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);
|
||||
@ -1365,7 +1365,7 @@ static void init_plx9080(struct comedi_device * dev)
|
||||
*/
|
||||
static int setup_subdevices(struct comedi_device * dev)
|
||||
{
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
void *dio_8255_iobase;
|
||||
int i;
|
||||
|
||||
@ -1881,7 +1881,7 @@ static int detach(struct comedi_device * dev)
|
||||
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;
|
||||
@ -2106,7 +2106,7 @@ static int ai_config_master_clock(struct comedi_device * dev, unsigned int * dat
|
||||
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];
|
||||
@ -2128,7 +2128,7 @@ static int ai_config_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -2679,7 +2679,7 @@ static inline void load_first_dma_descriptor(struct comedi_device * dev,
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
@ -2799,7 +2799,7 @@ static int ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
// 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;
|
||||
@ -2866,7 +2866,7 @@ static void pio_drain_ai_fifo_16(struct comedi_device * dev)
|
||||
*/
|
||||
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;
|
||||
@ -2955,7 +2955,7 @@ static void drain_dma_buffers(struct comedi_device * dev, unsigned int channel)
|
||||
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;
|
||||
@ -3077,7 +3077,7 @@ static void restart_ao_dma(struct comedi_device * dev)
|
||||
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;
|
||||
@ -3174,7 +3174,7 @@ void abort_dma(struct comedi_device * dev, unsigned int channel)
|
||||
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;
|
||||
|
||||
@ -3194,7 +3194,7 @@ static int ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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);
|
||||
@ -3224,7 +3224,7 @@ static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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)];
|
||||
@ -3413,7 +3413,7 @@ static inline int external_ai_queue_in_use(struct comedi_device * dev)
|
||||
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;
|
||||
|
||||
@ -3438,7 +3438,7 @@ static int ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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;
|
||||
@ -3461,7 +3461,7 @@ static int ao_inttrig(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -3577,7 +3577,7 @@ static int ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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);
|
||||
@ -3605,7 +3605,7 @@ static int dio_callback_4020(int dir, int port, int data, unsigned long iobase)
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
@ -3618,7 +3618,7 @@ static int di_rbits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -3634,7 +3634,7 @@ static int do_wbits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -3661,7 +3661,7 @@ static int dio_60xx_config_insn(struct comedi_device * dev, comedi_subdevice * s
|
||||
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]) {
|
||||
@ -3694,7 +3694,7 @@ static void caldac_write(struct comedi_device * dev, unsigned int channel,
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
@ -3709,7 +3709,7 @@ static int calib_write_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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);
|
||||
@ -3750,7 +3750,7 @@ static void ad8402_write(struct comedi_device * dev, unsigned int channel,
|
||||
}
|
||||
|
||||
/* 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);
|
||||
@ -3767,7 +3767,7 @@ static int ad8402_write_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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);
|
||||
@ -3839,7 +3839,7 @@ static uint16_t read_eeprom(struct comedi_device * dev, uint8_t address)
|
||||
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));
|
||||
|
@ -234,11 +234,11 @@ typedef struct {
|
||||
|
||||
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,
|
||||
@ -267,7 +267,7 @@ static comedi_driver driver_cb_pcidda = {
|
||||
*/
|
||||
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;
|
||||
|
||||
@ -413,7 +413,7 @@ static int cb_pcidda_detach(struct comedi_device * dev)
|
||||
* 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);
|
||||
@ -432,7 +432,7 @@ static int cb_pcidda_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
#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;
|
||||
@ -598,7 +598,7 @@ static int cb_pcidda_ns_to_timer(unsigned int *ns, int round)
|
||||
}
|
||||
#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;
|
||||
|
@ -184,11 +184,11 @@ static comedi_driver driver_cb_pcimdas = {
|
||||
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);
|
||||
|
||||
/*
|
||||
@ -199,7 +199,7 @@ static int cb_pcimdas_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
*/
|
||||
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;
|
||||
@ -372,7 +372,7 @@ static int cb_pcimdas_detach(struct comedi_device * dev)
|
||||
* "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;
|
||||
@ -437,7 +437,7 @@ static int cb_pcimdas_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -465,7 +465,7 @@ static int cb_pcimdas_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
|
||||
/* 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;
|
||||
|
@ -197,9 +197,9 @@ MODULE_DESCRIPTION("Comedi low-level driver for the Computerboards PCIM-DDA "
|
||||
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);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
@ -240,7 +240,7 @@ static int probe(struct comedi_device * dev, const comedi_devconfig * it);
|
||||
*/
|
||||
static int attach(struct comedi_device * dev, comedi_devconfig * it)
|
||||
{
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
int err;
|
||||
|
||||
/*
|
||||
@ -352,7 +352,7 @@ static int detach(struct comedi_device * dev)
|
||||
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;
|
||||
@ -391,7 +391,7 @@ static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
|
@ -213,9 +213,9 @@ static comedi_driver driver_bonding = {
|
||||
.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);
|
||||
|
||||
/*
|
||||
@ -226,7 +226,7 @@ static int bonding_dio_insn_config(struct comedi_device *dev, comedi_subdevice *
|
||||
*/
|
||||
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);
|
||||
|
||||
@ -293,7 +293,7 @@ static int bonding_detach(struct comedi_device *dev)
|
||||
* 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)
|
||||
@ -340,7 +340,7 @@ static int bonding_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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;
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
#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;
|
||||
@ -42,7 +42,7 @@ static void increment_scan_progress(comedi_subdevice *subd,
|
||||
}
|
||||
|
||||
/* 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;
|
||||
@ -67,7 +67,7 @@ unsigned int cfc_write_array_to_buffer(comedi_subdevice *subd, void *data,
|
||||
}
|
||||
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;
|
||||
@ -85,7 +85,7 @@ unsigned int cfc_read_array_from_buffer(comedi_subdevice *subd, void *data,
|
||||
}
|
||||
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;
|
||||
|
||||
|
@ -30,30 +30,30 @@
|
||||
#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;
|
||||
|
@ -108,7 +108,7 @@ struct parport_private {
|
||||
};
|
||||
#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]) {
|
||||
@ -123,7 +123,7 @@ static int parport_insn_a(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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]) {
|
||||
@ -138,7 +138,7 @@ static int parport_insn_config_a(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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]) {
|
||||
@ -151,7 +151,7 @@ static int parport_insn_b(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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;
|
||||
@ -167,7 +167,7 @@ static int parport_insn_c(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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)
|
||||
@ -177,7 +177,7 @@ static int parport_intr_insn(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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;
|
||||
@ -252,7 +252,7 @@ static int parport_intr_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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);
|
||||
@ -262,7 +262,7 @@ static int parport_intr_cmd(struct comedi_device *dev, comedi_subdevice *s)
|
||||
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");
|
||||
|
||||
@ -277,7 +277,7 @@ static int parport_intr_cancel(struct comedi_device *dev, comedi_subdevice *s)
|
||||
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");
|
||||
@ -296,7 +296,7 @@ static int parport_attach(struct comedi_device *dev, comedi_devconfig *it)
|
||||
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);
|
||||
|
@ -124,9 +124,9 @@ static inline RTIME nano2count(long long ns)
|
||||
|
||||
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,
|
||||
@ -162,7 +162,7 @@ typedef struct {
|
||||
} 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;
|
||||
|
||||
@ -209,7 +209,7 @@ inline static int check_conversion_timing(struct comedi_device * dev,
|
||||
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;
|
||||
|
||||
@ -234,7 +234,7 @@ static int timer_data_read(struct comedi_device * dev, comedi_cmd * cmd,
|
||||
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;
|
||||
@ -269,7 +269,7 @@ static int timer_data_write(struct comedi_device * dev, comedi_cmd * cmd,
|
||||
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;
|
||||
|
||||
@ -291,7 +291,7 @@ static int timer_dio_read(struct comedi_device * dev, comedi_cmd * cmd,
|
||||
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;
|
||||
@ -361,7 +361,7 @@ static void scan_task_func(comedi_rt_task_context_t d)
|
||||
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;
|
||||
@ -396,7 +396,7 @@ static void timer_task_func(comedi_rt_task_context_t d)
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
@ -444,7 +444,7 @@ static int cmdtest_helper(comedi_cmd * cmd,
|
||||
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;
|
||||
@ -516,7 +516,7 @@ static int timer_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -567,7 +567,7 @@ static int timer_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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)
|
||||
@ -578,7 +578,7 @@ static int timer_inttrig(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -610,7 +610,7 @@ static int timer_start_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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;
|
||||
|
@ -107,13 +107,13 @@ static comedi_driver driver_waveform = {
|
||||
|
||||
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);
|
||||
@ -194,7 +194,7 @@ static void waveform_ai_interrupt(unsigned long arg)
|
||||
|
||||
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;
|
||||
@ -269,7 +269,7 @@ static int waveform_detach(struct comedi_device *dev)
|
||||
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;
|
||||
@ -397,7 +397,7 @@ static int waveform_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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;
|
||||
|
||||
@ -429,7 +429,7 @@ static int waveform_ai_cmd(struct comedi_device *dev, comedi_subdevice *s)
|
||||
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);
|
||||
@ -439,7 +439,7 @@ static int waveform_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
|
||||
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];
|
||||
@ -460,7 +460,7 @@ static short fake_sawtooth(struct comedi_device *dev, unsigned int 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];
|
||||
@ -504,7 +504,7 @@ static short fake_waveform(struct comedi_device *dev, unsigned int channel,
|
||||
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);
|
||||
@ -515,7 +515,7 @@ static int waveform_ai_insn_read(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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);
|
||||
|
@ -85,13 +85,13 @@ static comedi_driver driver_contec = {
|
||||
};
|
||||
|
||||
/* 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);
|
||||
@ -100,7 +100,7 @@ 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);
|
||||
|
||||
@ -179,7 +179,7 @@ static int contec_detach(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
#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");
|
||||
@ -192,7 +192,7 @@ static int contec_ns_to_timer(unsigned int *ns, int round)
|
||||
}
|
||||
#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)
|
||||
{
|
||||
|
||||
@ -212,7 +212,7 @@ static int contec_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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)
|
||||
{
|
||||
|
||||
|
@ -393,7 +393,7 @@ static void setup_sampling(struct comedi_device * dev, int chan, int gain)
|
||||
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;
|
||||
@ -450,7 +450,7 @@ static int daqboard2000_ai_insn_read(struct comedi_device * dev, comedi_subdevic
|
||||
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;
|
||||
@ -463,7 +463,7 @@ static int daqboard2000_ao_insn_read(struct comedi_device * dev, comedi_subdevic
|
||||
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;
|
||||
@ -720,7 +720,7 @@ static int daqboard2000_8255_cb(int dir, int port, int data,
|
||||
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;
|
||||
|
@ -154,19 +154,19 @@ driver.
|
||||
|
||||
/* 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);
|
||||
@ -512,7 +512,7 @@ MODULE_DEVICE_TABLE(pci, das08_pci_table);
|
||||
|
||||
#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;
|
||||
@ -579,7 +579,7 @@ static int das08_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -588,7 +588,7 @@ static int das08_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -611,7 +611,7 @@ static int das08_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -620,7 +620,7 @@ static int das08jr_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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
|
||||
@ -634,7 +634,7 @@ static int das08jr_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -668,7 +668,7 @@ static int das08jr_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
* 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;
|
||||
@ -782,7 +782,7 @@ static unsigned int i8254_read_status(struct i8254_struct *st, int channel)
|
||||
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;
|
||||
@ -794,7 +794,7 @@ static int das08_counter_read(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -805,7 +805,7 @@ static int das08_counter_write(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -842,7 +842,7 @@ static comedi_driver driver_das08 = {
|
||||
|
||||
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
|
||||
|
@ -326,20 +326,20 @@ struct munge_info {
|
||||
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);
|
||||
@ -742,7 +742,7 @@ struct das16_private_struct {
|
||||
#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;
|
||||
@ -893,7 +893,7 @@ static int das16_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -996,7 +996,7 @@ static int das16_cmd_exec(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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;
|
||||
|
||||
@ -1031,7 +1031,7 @@ static void das16_reset(struct comedi_device * dev)
|
||||
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;
|
||||
@ -1079,7 +1079,7 @@ static int das16_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -1091,7 +1091,7 @@ static int das16_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -1111,7 +1111,7 @@ static int das16_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -1200,7 +1200,7 @@ static int disable_dma_on_even(struct comedi_device * dev)
|
||||
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;
|
||||
@ -1368,7 +1368,7 @@ static int das1600_mode_detect(struct comedi_device * dev)
|
||||
|
||||
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;
|
||||
@ -1715,7 +1715,7 @@ static unsigned int das16_suggest_transfer_size(struct comedi_device * dev,
|
||||
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);
|
||||
|
@ -131,19 +131,19 @@ static const comedi_lrange range_das16m1 = { 9,
|
||||
}
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
@ -200,7 +200,7 @@ static inline short munge_sample(short data)
|
||||
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;
|
||||
@ -322,7 +322,7 @@ static int das16m1_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -385,7 +385,7 @@ static int das16m1_cmd_exec(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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);
|
||||
@ -393,7 +393,7 @@ static int das16m1_cancel(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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;
|
||||
@ -430,7 +430,7 @@ static int das16m1_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -442,7 +442,7 @@ static int das16m1_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -462,7 +462,7 @@ static int das16m1_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -516,7 +516,7 @@ static void munge_sample_array(short * array, unsigned int num_elements)
|
||||
|
||||
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;
|
||||
@ -637,7 +637,7 @@ static int das16m1_irq_bits(unsigned int irq)
|
||||
|
||||
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;
|
||||
|
@ -183,29 +183,29 @@ enum {
|
||||
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);
|
||||
@ -592,7 +592,7 @@ static int das1800_init_dma(struct comedi_device * dev, unsigned int dma0,
|
||||
|
||||
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];
|
||||
@ -867,7 +867,7 @@ static int das1800_probe(struct comedi_device * dev)
|
||||
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;
|
||||
|
||||
@ -911,7 +911,7 @@ static irqreturn_t das1800_interrupt(int irq, void *d PT_REGS_ARG)
|
||||
// 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);
|
||||
@ -962,7 +962,7 @@ static void das1800_ai_handler(struct comedi_device * dev)
|
||||
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;
|
||||
@ -1023,7 +1023,7 @@ static void munge_data(struct comedi_device * dev, uint16_t * array,
|
||||
|
||||
/* 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;
|
||||
@ -1053,7 +1053,7 @@ static void das1800_flush_dma_channel(struct comedi_device * dev, comedi_subdevi
|
||||
|
||||
/* 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;
|
||||
@ -1084,7 +1084,7 @@ static void das1800_flush_dma(struct comedi_device * dev, comedi_subdevice * s)
|
||||
}
|
||||
|
||||
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;
|
||||
@ -1103,7 +1103,7 @@ static void das1800_handle_fifo_half_full(struct comedi_device * dev,
|
||||
}
|
||||
|
||||
static void das1800_handle_fifo_not_empty(struct comedi_device * dev,
|
||||
comedi_subdevice * s)
|
||||
struct comedi_subdevice * s)
|
||||
{
|
||||
short dpnt;
|
||||
int unipolar;
|
||||
@ -1126,7 +1126,7 @@ static void das1800_handle_fifo_not_empty(struct comedi_device * dev,
|
||||
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 */
|
||||
@ -1139,7 +1139,7 @@ static int das1800_cancel(struct comedi_device * dev, comedi_subdevice * s)
|
||||
}
|
||||
|
||||
/* 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;
|
||||
@ -1489,7 +1489,7 @@ static void program_chanlist(struct comedi_device * dev, comedi_cmd cmd)
|
||||
}
|
||||
|
||||
// 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;
|
||||
@ -1552,7 +1552,7 @@ static int das1800_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
}
|
||||
|
||||
/* 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;
|
||||
@ -1612,7 +1612,7 @@ static int das1800_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
}
|
||||
|
||||
/* 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);
|
||||
@ -1641,7 +1641,7 @@ static int das1800_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
}
|
||||
|
||||
/* 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)
|
||||
{
|
||||
|
||||
@ -1652,7 +1652,7 @@ static int das1800_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
}
|
||||
|
||||
/* 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;
|
||||
|
@ -116,7 +116,7 @@ typedef struct {
|
||||
} 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)
|
||||
{
|
||||
@ -154,7 +154,7 @@ 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");
|
||||
@ -195,7 +195,7 @@ static void das6402_ai_fifo_read(struct comedi_device * dev, short * data, int 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))
|
||||
@ -204,7 +204,7 @@ static void das6402_ai_fifo_dregs(struct comedi_device * dev, comedi_subdevice *
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
@ -226,7 +226,7 @@ static int das6402_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
|
||||
}
|
||||
|
||||
#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;
|
||||
@ -304,7 +304,7 @@ static int das6402_attach(struct comedi_device * dev, comedi_devconfig * it)
|
||||
unsigned int irq;
|
||||
unsigned long iobase;
|
||||
int ret;
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
|
||||
dev->board_name = "das6402";
|
||||
|
||||
|
@ -244,7 +244,7 @@ typedef struct {
|
||||
|
||||
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",
|
||||
@ -259,14 +259,14 @@ static comedi_driver driver_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);
|
||||
@ -348,7 +348,7 @@ static irqreturn_t das800_interrupt(int irq, void *d PT_REGS_ARG)
|
||||
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;
|
||||
@ -443,7 +443,7 @@ static irqreturn_t das800_interrupt(int irq, void *d PT_REGS_ARG)
|
||||
|
||||
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;
|
||||
@ -551,7 +551,7 @@ static int das800_detach(struct comedi_device * dev)
|
||||
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;
|
||||
@ -584,7 +584,7 @@ static void disable_das800(struct comedi_device * dev)
|
||||
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;
|
||||
@ -709,7 +709,7 @@ static int das800_ai_do_cmdtest(struct comedi_device * dev, comedi_subdevice * s
|
||||
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;
|
||||
@ -788,7 +788,7 @@ static int das800_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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;
|
||||
@ -842,7 +842,7 @@ static int das800_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -855,7 +855,7 @@ static int das800_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
|
@ -289,20 +289,20 @@ static comedi_driver driver_dmm32at = {
|
||||
};
|
||||
|
||||
/* 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);
|
||||
@ -316,7 +316,7 @@ 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;
|
||||
@ -497,7 +497,7 @@ static int dmm32at_detach(struct comedi_device * dev)
|
||||
* 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;
|
||||
@ -568,7 +568,7 @@ static int dmm32at_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -752,7 +752,7 @@ static int dmm32at_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -822,7 +822,7 @@ 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_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
{
|
||||
devpriv->ai_scans_left = 1;
|
||||
return 0;
|
||||
@ -844,7 +844,7 @@ static irqreturn_t dmm32at_isr(int irq, void *d PT_REGS_ARG)
|
||||
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++) {
|
||||
@ -893,7 +893,7 @@ static int dmm32at_ns_to_timer(unsigned int *ns, int round)
|
||||
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;
|
||||
@ -936,7 +936,7 @@ static int dmm32at_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
|
||||
/* 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;
|
||||
@ -953,7 +953,7 @@ static int dmm32at_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
* 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;
|
||||
@ -1006,7 +1006,7 @@ static int dmm32at_dio_insn_bits(struct comedi_device * dev, comedi_subdevice *
|
||||
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;
|
||||
|
@ -224,15 +224,15 @@ typedef struct {
|
||||
} 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:
|
||||
@ -480,7 +480,7 @@ static const comedi_lrange *ai_range_lkup(int type, int opt)
|
||||
*/
|
||||
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;
|
||||
@ -605,7 +605,7 @@ static int dt2801_error(struct comedi_device * dev, int stat)
|
||||
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;
|
||||
@ -627,7 +627,7 @@ static int dt2801_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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)];
|
||||
@ -635,7 +635,7 @@ static int dt2801_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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);
|
||||
@ -647,7 +647,7 @@ static int dt2801_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s
|
||||
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;
|
||||
@ -671,7 +671,7 @@ static int dt2801_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s
|
||||
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;
|
||||
|
@ -226,15 +226,15 @@ static comedi_driver driver_dt2811 = {
|
||||
|
||||
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 };
|
||||
@ -314,7 +314,7 @@ static int dt2811_attach(struct comedi_device * dev, comedi_devconfig * it)
|
||||
//unsigned long irqs;
|
||||
//long flags;
|
||||
int ret;
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase;
|
||||
|
||||
iobase = it->options[0];
|
||||
@ -490,7 +490,7 @@ static int dt2811_detach(struct comedi_device * dev)
|
||||
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);
|
||||
@ -541,7 +541,7 @@ int dt2811_adtrig(kdev_t minor, comedi_adtrig * adtrig)
|
||||
}
|
||||
#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;
|
||||
@ -559,7 +559,7 @@ static int dt2811_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -574,7 +574,7 @@ static int dt2811_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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)
|
||||
@ -585,7 +585,7 @@ static int dt2811_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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)
|
||||
|
@ -81,7 +81,7 @@ typedef struct {
|
||||
#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;
|
||||
@ -132,7 +132,7 @@ static int dt2814_ns_to_timer(unsigned int *ns, unsigned int flags)
|
||||
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;
|
||||
@ -224,7 +224,7 @@ static int dt2814_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -247,7 +247,7 @@ static int dt2814_attach(struct comedi_device * dev, comedi_devconfig * it)
|
||||
{
|
||||
int i, irq;
|
||||
int ret;
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase;
|
||||
|
||||
iobase = it->options[0];
|
||||
@ -345,7 +345,7 @@ static irqreturn_t dt2814_interrupt(int irq, void *d PT_REGS_ARG)
|
||||
{
|
||||
int lo, hi;
|
||||
struct comedi_device *dev = d;
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
int data;
|
||||
|
||||
if (!dev->attached) {
|
||||
|
@ -106,7 +106,7 @@ static int dt2815_wait_for_status(struct comedi_device * dev, int status)
|
||||
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;
|
||||
@ -119,7 +119,7 @@ static int dt2815_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -179,7 +179,7 @@ static int dt2815_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
|
||||
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;
|
||||
|
@ -58,7 +58,7 @@ static comedi_driver driver_dt2817 = {
|
||||
|
||||
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;
|
||||
@ -96,7 +96,7 @@ static int dt2817_dio_insn_config(struct comedi_device * dev, comedi_subdevice *
|
||||
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;
|
||||
@ -134,7 +134,7 @@ static int dt2817_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s
|
||||
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];
|
||||
|
@ -411,8 +411,8 @@ COMEDI_INITCLEANUP(driver_dt282x);
|
||||
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);
|
||||
|
||||
@ -445,7 +445,7 @@ static void dt282x_ao_dma_interrupt(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);
|
||||
|
||||
@ -478,7 +478,7 @@ static void dt282x_ai_dma_interrupt(struct comedi_device * dev)
|
||||
int size;
|
||||
int i;
|
||||
int ret;
|
||||
comedi_subdevice *s = dev->subdevices;
|
||||
struct comedi_subdevice *s = dev->subdevices;
|
||||
|
||||
update_supcsr(DT2821_CLRDMADNE);
|
||||
|
||||
@ -580,8 +580,8 @@ static int prep_ao_dma(struct comedi_device * dev, int dma_index, int n)
|
||||
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;
|
||||
|
||||
@ -674,7 +674,7 @@ static void dt282x_load_changain(struct comedi_device * dev, int n,
|
||||
* - 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;
|
||||
@ -706,7 +706,7 @@ static int dt282x_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -818,7 +818,7 @@ static int dt282x_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -887,7 +887,7 @@ static void dt282x_disable_dma(struct comedi_device * dev)
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@ -937,7 +937,7 @@ static int dt282x_ns_to_timer(int *nanosec, int round_mode)
|
||||
* 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)];
|
||||
@ -945,7 +945,7 @@ static int dt282x_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -978,7 +978,7 @@ static int dt282x_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s
|
||||
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;
|
||||
@ -1069,7 +1069,7 @@ static int dt282x_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
@ -1099,7 +1099,7 @@ static int dt282x_ao_inttrig(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -1132,7 +1132,7 @@ static int dt282x_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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);
|
||||
|
||||
@ -1145,7 +1145,7 @@ static int dt282x_ao_cancel(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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]) {
|
||||
@ -1159,7 +1159,7 @@ static int dt282x_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s
|
||||
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;
|
||||
@ -1244,7 +1244,7 @@ static int dt282x_attach(struct comedi_device * dev, comedi_devconfig * it)
|
||||
{
|
||||
int i, irq;
|
||||
int ret;
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase;
|
||||
|
||||
dev->board_name = this_board->name;
|
||||
|
@ -282,10 +282,10 @@ static comedi_driver driver_dt3000 = {
|
||||
|
||||
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
|
||||
@ -346,7 +346,7 @@ static int debug_n_ints = 0;
|
||||
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) {
|
||||
@ -396,7 +396,7 @@ static void debug_intr_flags(unsigned int flags)
|
||||
}
|
||||
#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;
|
||||
@ -425,7 +425,7 @@ static void dt3k_ai_empty_fifo(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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;
|
||||
@ -587,7 +587,7 @@ static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec,
|
||||
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;
|
||||
@ -655,7 +655,7 @@ static int dt3k_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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;
|
||||
|
||||
@ -667,7 +667,7 @@ static int dt3k_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
|
||||
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;
|
||||
@ -685,7 +685,7 @@ static int dt3k_ai_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -700,7 +700,7 @@ static int dt3k_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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;
|
||||
@ -729,7 +729,7 @@ static void dt3k_dio_config(struct comedi_device * dev, int bits)
|
||||
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;
|
||||
@ -760,7 +760,7 @@ static int dt3k_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s
|
||||
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)
|
||||
@ -776,7 +776,7 @@ static int dt3k_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
|
||||
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);
|
||||
@ -799,7 +799,7 @@ static int dt_pci_probe(struct comedi_device * dev, int bus, int slot);
|
||||
|
||||
static int dt3000_attach(struct comedi_device * dev, comedi_devconfig * it)
|
||||
{
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
int bus, slot;
|
||||
int ret = 0;
|
||||
|
||||
|
@ -897,7 +897,7 @@ static void dt9812_comedi_open(struct comedi_device *dev)
|
||||
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;
|
||||
@ -940,7 +940,7 @@ static void dt9812_comedi_open(struct comedi_device *dev)
|
||||
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;
|
||||
@ -952,7 +952,7 @@ static int dt9812_di_rinsn(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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;
|
||||
@ -970,7 +970,7 @@ static int dt9812_do_winsn(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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;
|
||||
@ -985,7 +985,7 @@ static int dt9812_ai_rinsn(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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;
|
||||
@ -999,7 +999,7 @@ static int dt9812_ao_rinsn(struct comedi_device *dev, comedi_subdevice *s,
|
||||
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;
|
||||
@ -1012,7 +1012,7 @@ static int dt9812_ao_winsn(struct comedi_device *dev, comedi_subdevice *s,
|
||||
static int dt9812_attach(struct comedi_device *dev, comedi_devconfig *it)
|
||||
{
|
||||
int i;
|
||||
comedi_subdevice *s;
|
||||
struct comedi_subdevice *s;
|
||||
|
||||
dev->board_name = "dt9812";
|
||||
|
||||
|
@ -53,17 +53,17 @@ static comedi_driver driver_fl512 = {
|
||||
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;
|
||||
@ -88,7 +88,7 @@ static int fl512_ai_insn(struct comedi_device * dev,
|
||||
* 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 */
|
||||
@ -109,7 +109,7 @@ static int fl512_ao_insn(struct comedi_device * dev,
|
||||
* 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);
|
||||
@ -127,7 +127,7 @@ static int fl512_ao_insn_readback(struct comedi_device * dev,
|
||||
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];
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user