struct comedi_insn *insn,
unsigned int *data)
{
- struct addi_private *devpriv = dev->private;
+ struct apci1516_private *devpriv = dev->private;
if (data[0] == 0) {
/* Disable the watchdog */
- outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_CTRL_REG);
+ outw(0x0, devpriv->wdog_iobase + APCI1516_WDOG_CTRL_REG);
/* Loading the Reload value */
- outw(data[1], devpriv->i_IobaseAddon +
+ outw(data[1], devpriv->wdog_iobase +
APCI1516_WDOG_RELOAD_LSB_REG);
data[1] = data[1] >> 16;
- outw(data[1], devpriv->i_IobaseAddon +
+ outw(data[1], devpriv->wdog_iobase +
APCI1516_WDOG_RELOAD_MSB_REG);
} /* if(data[0]==0) */
else {
struct comedi_insn *insn,
unsigned int *data)
{
- struct addi_private *devpriv = dev->private;
+ struct apci1516_private *devpriv = dev->private;
switch (data[0]) {
case 0: /* stop the watchdog */
- outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_CTRL_REG);
+ outw(0x0, devpriv->wdog_iobase + APCI1516_WDOG_CTRL_REG);
break;
case 1: /* start the watchdog */
outw(APCI1516_WDOG_CTRL_ENABLE,
- devpriv->i_IobaseAddon + APCI1516_WDOG_CTRL_REG);
+ devpriv->wdog_iobase + APCI1516_WDOG_CTRL_REG);
break;
case 2: /* Software trigger */
outw(APCI1516_WDOG_CTRL_ENABLE | APCI1516_WDOG_CTRL_SOFT_TRIG,
- devpriv->i_IobaseAddon + APCI1516_WDOG_CTRL_REG);
+ devpriv->wdog_iobase + APCI1516_WDOG_CTRL_REG);
break;
default:
printk("\nSpecified functionality does not exist\n");
struct comedi_insn *insn,
unsigned int *data)
{
- struct addi_private *devpriv = dev->private;
+ struct apci1516_private *devpriv = dev->private;
- data[0] = inw(devpriv->i_IobaseAddon + APCI1516_WDOG_STATUS_REG) & 0x1;
+ data[0] = inw(devpriv->wdog_iobase + APCI1516_WDOG_STATUS_REG) & 0x1;
return insn->n;
}
#include "addi-data/addi_common.h"
+struct apci1516_private {
+ unsigned long wdog_iobase;
+};
+
#include "addi-data/hwdrv_apci1516.c"
static const struct addi_board apci1516_boardtypes[] = {
static int apci1516_reset(struct comedi_device *dev)
{
const struct addi_board *this_board = comedi_board(dev);
- struct addi_private *devpriv = dev->private;
+ struct apci1516_private *devpriv = dev->private;
if (!this_board->i_Timer)
return 0;
outw(0x0, dev->iobase + APCI1516_DO_REG);
- outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_CTRL_REG);
- outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_RELOAD_LSB_REG);
- outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_RELOAD_MSB_REG);
+ outw(0x0, devpriv->wdog_iobase + APCI1516_WDOG_CTRL_REG);
+ outw(0x0, devpriv->wdog_iobase + APCI1516_WDOG_RELOAD_LSB_REG);
+ outw(0x0, devpriv->wdog_iobase + APCI1516_WDOG_RELOAD_MSB_REG);
return 0;
}
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
const struct addi_board *this_board;
- struct addi_private *devpriv;
+ struct apci1516_private *devpriv;
struct comedi_subdevice *s;
int ret;
return ret;
dev->iobase = pci_resource_start(pcidev, 1);
- devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2);
+ devpriv->wdog_iobase = pci_resource_start(pcidev, 2);
ret = comedi_alloc_subdevices(dev, 3);
if (ret)