Lines Matching refs:counter

8  * Description: National Instruments 660x counter/timer boards
293 static void ni_660x_gpct_write(struct ni_gpct *counter, unsigned int bits,
296 struct comedi_device *dev = counter->counter_dev->dev;
298 ni_660x_write(dev, counter->chip_index, bits, reg);
301 static unsigned int ni_660x_gpct_read(struct ni_gpct *counter,
304 struct comedi_device *dev = counter->counter_dev->dev;
306 return ni_660x_read(dev, counter->chip_index, reg);
311 struct ni_gpct *counter)
314 unsigned int chip = counter->chip_index;
318 counter->counter_index);
326 struct ni_gpct *counter)
329 unsigned int chip = counter->chip_index;
337 struct ni_gpct *counter,
346 ring = devpriv->ring[counter->chip_index][counter->counter_index];
351 "failed to reserve mite dma channel for counter\n");
355 ni_tio_set_mite_channel(counter, mite_chan);
356 ni_660x_set_dma_channel(dev, mite_chan->channel, counter);
362 struct ni_gpct *counter)
368 if (counter->mite_chan) {
369 struct mite_channel *mite_chan = counter->mite_chan;
371 ni_660x_unset_dma_channel(dev, mite_chan->channel, counter);
372 ni_tio_set_mite_channel(counter, NULL);
380 struct ni_gpct *counter = s->private;
383 retval = ni_660x_request_mite_channel(dev, counter, COMEDI_INPUT);
386 "no dma channel available for use by counter\n");
389 ni_tio_acknowledge(counter);
396 struct ni_gpct *counter = s->private;
399 retval = ni_tio_cancel(counter);
400 ni_660x_release_mite_channel(dev, counter);
423 struct ni_gpct *counter = s->private;
425 ni_tio_handle_interrupt(counter, s);
457 struct ni_gpct *counter = s->private;
462 mite_sync_dma(counter->mite_chan, s);
471 struct ni_gpct *counter = s->private;
475 ring = devpriv->ring[counter->chip_index][counter->counter_index];
1139 * chan 8-39: counter signal inputs
1153 struct ni_gpct *counter = &gpct_dev->counters[i];
1170 s->private = counter;
1172 ni_tio_init_counter(counter);
1179 * To be safe, set counterswap bits on tio chips after all the counter
1253 MODULE_DESCRIPTION("Comedi driver for NI 660x counter/timer boards");