- From: Roman Fietze <fietze_at_s.netic.de>
- Date: Wed, 13 Nov 2002 18:34:27 +0100
Hello Daniel,
On Tue, Nov 12, 2002 at 10:46:59PM +0100, Daniel Koch wrote:
> comedi_config /dev/comedi0 pc104-das16/jr16 0x220,,3,10,,,,,100
> - --read-buffersize 4096
>
> I`m not sure about the 100, is it freq/1000 ?
The parameter #8 (when starting with #0) is just boolean, 0 or 1. The
timing for the timer interrupt is calculated automatically by das16.c
I think I have a slightly modified version, which calculates the
timing as follow:
#define MINIMUM_TIMER_PERIOD (HZ / 15) // 0.6s
#define MAXIMUM_TIMER_PERIOD (HZ / 2) // half a second
...
// utility function to suggest timer period in jiffies in timer mode
static unsigned int das16_suggest_timer_period(comedi_device *dev, comedi_cmd cmd)
{
unsigned int period = 0;
if (cmd.convert_src == TRIG_TIMER)
{
// fill up DMA no more than 50% for fastest DAC
period = (HZ * (unsigned long)cmd.convert_arg) / 100000;
}
if (period < MINIMUM_TIMER_PERIOD)
period = MINIMUM_TIMER_PERIOD;
else if (period > MAXIMUM_TIMER_PERIOD)
period = MAXIMUM_TIMER_PERIOD;
DEBUG_PRINT("period = %u\n", period);
return period;
}
Your mileage might vary.
Roman
--
Roman Fietze fietze_at_s.netic.de
My public key is on http://www.s.netic.de/fietze/index.html
Attachments
- application/pgp-signature attachment: stored
Received on 2002-11-13Z17:34:27