*/
/*
Driver: pcl818.o
-Description: Advantech PCL-818 cards (818, 818L, 818H, 818HD, 818HG),
- Advantech PCL-718
+Description: Advantech PCL-818 cards, PCL-718
Author: Michal Dobes <majkl@tesnet.cz>
+Devices: [Advantech] PCL-818L (pcl818l), PCL-818H (pcl818h),
+ PCL-818HD (pcl818hd), PCL-818HG (pcl818hg), PCL-818 (pcl818),
+ PCL-718 (pcl718)
Status: works
All cards have 16 SE/8 DIFF ADCs, one or two DACs, 16 DI and 16 DO.
/*
==============================================================================
*/
+#ifdef unused
static int check_and_setup_channel_list(comedi_device * dev, comedi_subdevice * s, comedi_trig * it);
+#endif
static int pcl818_ai_cancel(comedi_device * dev, comedi_subdevice * s);
+#ifdef unused
static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1, unsigned int divisor2);
+#endif
static int set_rtc_irq_bit(unsigned char bit);
+#ifdef unused
static void rtc_dropped_irq(unsigned long data);
static int rtc_setfreq_irq(int freq);
+#endif
/*
==============================================================================
==============================================================================
ANALOG INPUT MODE 1 or 3 DMA , 818 cards
*/
-#ifdef CONFIG_COMEDI_TRIG
+#ifdef unused
static void pcl818_ai_mode13dma_int(int mode, comedi_device * dev, comedi_subdevice * s, comedi_trig * it)
{
unsigned int flags;
outb(0x86 | (dev->irq << 4), dev->iobase + PCL818_CONTROL); /* Ext trig+IRQ+DMA */
};
}
-#endif
/*
==============================================================================
ANALOG INPUT MODE 1 or 3 DMA rtc, 818 cards
*/
-#ifdef CONFIG_COMEDI_TRIG
static void pcl818_ai_mode13dma_rtc(int mode, comedi_device * dev, comedi_subdevice * s, comedi_trig * it)
{
unsigned int flags;
outb(0x06 | (dev->irq << 4), dev->iobase + PCL818_CONTROL); /* Ext trig+DMA */
};
}
-#endif
/*
==============================================================================
ANALOG INPUT MODE 1 or 3, 818 cards
*/
-#ifdef CONFIG_COMEDI_TRIG
static int pcl818_ai_mode13(int mode, comedi_device * dev, comedi_subdevice * s, comedi_trig * it)
{
int divisor1, divisor2;
return 0;
}
-#endif
/*
==============================================================================
ANALOG INPUT MODE 1, 818 cards
*/
-#ifdef CONFIG_COMEDI_TRIG
static int pcl818_ai_mode1(comedi_device * dev, comedi_subdevice * s, comedi_trig * it)
{
return pcl818_ai_mode13(1, dev, s, it);
}
-#endif
/*
==============================================================================
ANALOG INPUT MODE 3, 818 cards
*/
-#ifdef CONFIG_COMEDI_TRIG
static int pcl818_ai_mode3(comedi_device * dev, comedi_subdevice * s, comedi_trig * it)
{
return pcl818_ai_mode13(3, dev, s, it);
}
-#endif
/*
==============================================================================
ANALOG OUTPUT MODE 1 or 3, 818 cards
*/
#ifdef PCL818_MODE13_AO
-#ifdef CONFIG_COMEDI_TRIG
static int pcl818_ao_mode13(int mode, comedi_device * dev, comedi_subdevice * s, comedi_trig * it)
{
int divisor1, divisor2;
return 0;
}
-#endif
/*
==============================================================================
ANALOG OUTPUT MODE 1, 818 cards
*/
-#ifdef CONFIG_COMEDI_TRIG
static int pcl818_ao_mode1(comedi_device * dev, comedi_subdevice * s, comedi_trig * it)
{
return pcl818_ao_mode13(1, dev, s, it);
}
-#endif
/*
==============================================================================
ANALOG OUTPUT MODE 3, 818 cards
*/
-#ifdef CONFIG_COMEDI_TRIG
static int pcl818_ao_mode3(comedi_device * dev, comedi_subdevice * s, comedi_trig * it)
{
return pcl818_ao_mode13(3, dev, s, it);
==============================================================================
Start/stop pacer onboard pacer
*/
+#ifdef unused
static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1, unsigned int divisor2)
{
outb(0xb4, dev->iobase + PCL818_CTRCTL);
// we can serve this with MUX logic
return 1;
}
+#endif
/*
==============================================================================
==============================================================================
Restart RTC if something stop it (xntpd every 11 mins or large IDE transfers)
*/
+#ifdef unused
static void rtc_dropped_irq(unsigned long data)
{
comedi_device *dev = (void *)data;
restore_flags(flags);
return rtc_freq;
}
+#endif
/*
==============================================================================
s->range_table = this_board->ai_range_type;
s->cancel=pcl818_ai_cancel;
s->insn_read = pcl818_ai_insn_read;
-#ifdef CONFIG_COMEDI_TRIG
- if ((irq)||(devpriv->dma_rtc)) {
- s->trig[1] = pcl818_ai_mode1;
- s->trig[3] = pcl818_ai_mode3;
- }
-#endif
+ //if ((irq)||(devpriv->dma_rtc)) {
+ //s->trig[1] = pcl818_ai_mode1;
+ //s->trig[3] = pcl818_ai_mode3;
+ //}
if(this_board->is_818){
if ((it->options[4]==1)||(it->options[4]==10))
s->range_table=&range_pcl818l_h_ai; // secondary range list jumper selectable
s->range_table = this_board->ao_range_type;
s->insn_read = pcl818_ao_insn_read;
s->insn_write = pcl818_ao_insn_write;
-#ifdef CONFIG_COMEDI_TRIG
+#ifdef unused
#ifdef PCL818_MODE13_AO
if (irq) {
s->trig[1] = pcl818_ao_mode1;