#include "8253.h"
#include "8255.h"
+#define CB_PCIDAS_DEBUG // enable debugging code
+//#undef CB_PCIDAS_DEBUG // disable debugging code
+
// PCI vendor number of ComputerBoards/MeasurementComputing
#define PCI_VENDOR_CB 0x1307
#define TIMER_BASE 100 // 10MHz master clock
#define PACER_BADRINDEX 3
#define AO_BADRINDEX 4
// sizes of io regions
-#define S5933_SIZE 256
+#define S5933_SIZE 128
#define CONT_STAT_SIZE 10
#define ADC_FIFO_SIZE 4
#define PACER_SIZE 12
// amcc s5933 pci configuration registers
#define INTCSR 0x38 // interrupt control/status
-#define INTLN 0x3c // read interrupt line
-#define INTPIN 0x3d // read interrupt pin
+#define ADD_INT_EN 0x2000 //enable add-on interrupt
/* Control/Status registers */
#define INT_ADCFIFO 0 // INTERRUPT / ADC FIFO register
subdev_8255_init(dev, s, NULL,
(void *)(devpriv->pacer_counter_dio + DIO_8255));
+#ifdef CB_PCIDAS_DEBUG
+ // enable passing of interrupts through amcc s5933 chip
+ outl(ADD_INT_EN, devpriv->s5933_config + INTCSR);
+ rt_printk("finished attach, intcsr register is 0x%x\n", inl(devpriv->s5933_config + INTCSR));
+#endif
+
return 1;
}
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
- int bits;
+ unsigned int bits;
// initialize before settings pacer source and count values
outw(0, devpriv->control_status + TRIG_CONTSTAT);