#define PCI230_ADCG 0x0E
/* Convertor related constants. */
-#define PCI230_DAC_SETTLE 5 /* Analogue output settling time in µs (DAC itself is 1µs nominally). */
-#define PCI230_ADC_SETTLE 1 /* Analogue input settling time in µs (ADC itself is 1.6µs nominally but we poll anyway). */
-#define PCI230_MUX_SETTLE 10 /* ADC MUX settling time in µS - 10µs for se, 20µs de. */
+#define PCI230_DAC_SETTLE 5 /* Analogue output settling time in µs (DAC itself is 1µs nominally). */
+#define PCI230_ADC_SETTLE 1 /* Analogue input settling time in µs (ADC itself is 1.6µs nominally but we poll anyway). */
+#define PCI230_MUX_SETTLE 10 /* ADC MUX settling time in µS - 10µs for se, 20µs de. */
/* DACCON values. */
#define PCI230_DAC_BUSY_BIT 1
static int pci230_ao_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
static int pci230_ct_insn_config(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
static int pci230_ct_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
+#if 0
static void pci230_ns_to_timer(unsigned int *ns,int round);
+#endif
static void pci230_ns_to_single_timer(unsigned int *ns,int round);
static void i8253_single_ns_to_timer(unsigned int i8253_osc_base, unsigned int *d, unsigned int *nanosec, int round_mode);
static void pci230_setup_monostable_ct0(comedi_device *dev, unsigned int ns, unsigned int n_chan);
+#if 0
static void pci230_z2_ct0(comedi_device *dev, unsigned int *ns,int round);
+#endif
static void pci230_z2_ct1(comedi_device *dev, unsigned int *ns,int round);
static void pci230_z2_ct2(comedi_device *dev, unsigned int *ns,int round);
+#if 0
static void pci230_cancel_ct0(comedi_device *dev);
+#endif
static void pci230_cancel_ct1(comedi_device *dev);
static void pci230_cancel_ct2(comedi_device *dev);
static irqreturn_t pci230_interrupt(int irq, void *d, struct pt_regs *regs);
}
+#if 0
/* This function doesn't require a particular form, this is just
* what happens to be used in some of the drivers. It should
* convert ns nanoseconds to a counter value suitable for programming
i8253_cascade_ns_to_timer_2div(PCI230_TIMEBASE_10MHZ, &divisor0, &divisor1, ns, TRIG_ROUND_MASK);
return;
}
+#endif
/* This function is used for analogue input. Only one counter/timer can be used,
static void i8253_single_ns_to_timer(unsigned int i8253_osc_base, unsigned int *d, unsigned int *nanosec, int round_mode)
{
- int divider;
unsigned int div;
/* exit early if everything is already correct (this can save time
}
+#if 0
/*
* Set ZCLK_CT0 to square wave mode with period of ns.
*/
}
return;
}
+#endif
+#if 0
static void pci230_cancel_ct0(comedi_device *dev)
{
devpriv->divisor0 = 0;
i8254_load(devpriv->pci_iobase + PCI230_Z2_CT0, 0, devpriv->divisor0, 0); /* Counter 0, divisor0, 8254 mode 0. */
}
+#endif
/*
* Set ZCLK_CT1 to square wave mode with period of ns.
5 ai 0=straight binary, 1=2's comp
6 ao0 0=straight binary, 1=2's comp
7 ao1 0=straight binary, 1=2's comp
- 8 ai 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V
- 9 ao0 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V, 4=±2.5 V
- 10 ao1 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V, 4=±2.5 V
+ 8 ai 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V
+ 9 ao0 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V, 4=±2.5 V
+ 10 ao1 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V, 4=±2.5 V
*/
static int dt282x_attach(comedi_device * dev, comedi_devconfig * it)
{
int ret;
uint64_t resourceStart;
dma_addr_t appdma;
+ comedi_subdevice *s;
if(alloc_private(dev,sizeof(s626_private))<0)
return -ENOMEM;
}
- comedi_subdevice *s;
-
dev->board_ptr = s626_boards;
dev->board_name = thisboard->name;
devpriv->ai_cmd_running=0;
if (devpriv->base_addr && (devpriv->allocatedBuf==2)){
+ uint32_t *pPhysBuf;
+ uint16_t chan;
// enab DEBI and audio pins, enable I2C interface.
MC_ENABLE( P_MC1, MC1_DEBI | MC1_AUDIO | MC1_I2C );
// end initADC
// init the DAC interface
- uint32_t *pPhysBuf;
// Init Audio2's output DMAC attributes: burst length = 1 DWORD,
// threshold = 1 DWORD.
// Init all DAC outputs to 0V and init all DAC setpoint and
// polarity images.
- uint16_t chan;
for ( chan = 0; chan < S626_DAC_CHANNELS; chan++)
SetDAC(dev,chan, 0 );