#define DIO_8255 4
#define DAC8254 8
+/*
+ * PCI BAR4 Register map (devpriv->pcibar4)
+ */
+
/* analog output registers for 100x, 1200 series */
static inline unsigned int DAC_DATA_REG(unsigned int channel)
{
unsigned long s5933_config;
unsigned long pcibar1;
unsigned long pcibar2;
- unsigned long ao_registers;
+ unsigned long pcibar4;
/* bits to write to registers */
unsigned int adc_fifo_bits;
unsigned int s5933_intcsr_bits;
s->readback[chan] = data[0];
/* send data */
- outw(data[0], devpriv->ao_registers + DAC_DATA_REG(chan));
+ outw(data[0], devpriv->pcibar4 + DAC_DATA_REG(chan));
return insn->n;
}
unsigned long flags;
/* clear dac fifo */
- outw(0, devpriv->ao_registers + DACFIFOCLR);
+ outw(0, devpriv->pcibar4 + DACFIFOCLR);
/* set channel and range */
spin_lock_irqsave(&dev->spinlock, flags);
s->readback[chan] = data[0];
/* send data */
- outw(data[0], devpriv->ao_registers + DACDATA);
+ outw(data[0], devpriv->pcibar4 + DACDATA);
return insn->n;
}
nbytes = comedi_buf_read_samples(s, devpriv->ao_buffer, nsamples);
nsamples = comedi_bytes_to_samples(s, nbytes);
- outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer, nsamples);
+ outsw(devpriv->pcibar4 + DACDATA, devpriv->ao_buffer, nsamples);
}
static int cb_pcidas_ao_inttrig(struct comedi_device *dev,
spin_unlock_irqrestore(&dev->spinlock, flags);
/* clear fifo */
- outw(0, devpriv->ao_registers + DACFIFOCLR);
+ outw(0, devpriv->pcibar4 + DACFIFOCLR);
/* load counters */
if (cmd->scan_begin_src == TRIG_TIMER) {
outw(devpriv->adc_fifo_bits | DAEMI,
devpriv->pcibar1 + INT_ADCFIFO);
spin_unlock_irqrestore(&dev->spinlock, flags);
- if (inw(devpriv->ao_registers + DAC_CSR) & DAC_EMPTY) {
+ if (inw(devpriv->pcibar4 + DAC_CSR) & DAC_EMPTY) {
if (cmd->stop_src == TRIG_COUNT &&
async->scans_done >= cmd->stop_arg) {
async->events |= COMEDI_CB_EOA;
devpriv->pcibar2 = pci_resource_start(pcidev, 2);
dev->iobase = pci_resource_start(pcidev, 3);
if (board->has_ao)
- devpriv->ao_registers = pci_resource_start(pcidev, 4);
+ devpriv->pcibar4 = pci_resource_start(pcidev, 4);
/* disable and clear interrupts on amcc s5933 */
outl(INTCSR_INBOX_INTR_STATUS,