There is already a commented out rule in the example udev rules file
"z99_comedi.rules" to set the mode to 0660 and set the group owner to
"comedi". Add an almost identical commented out rule to set the group
owner to "iocard" as this is favoured by Debian.
just left udev as the only hotplug mechanism. I've also added
an option to disable the installation of the firmware. This
is useful for debian or ubuntu packages where the firmware
is now provided by a package accompanying the staging kernel.
All usbdux files are included in the kernel firmware packages.
Package maintainers should use the --disable-firmware option.
In the early udev days the firmware had to be uploaded
by comedi_config. However now the driver requests the
firmware by itself and there is no need to have dedicated
scripts for every kernel module in udev.
Firmware now only measures as many channels as are in the channel list. If
there's only one channel in the list we can manage to measure within one
microframe. This makes it possible to measure with 8kHz max.
Added a counter. The counter is called every 2ms from an FX2 timer inerrupt. Low
priority so that measurements are not disturbed.
The bulk transfers are now two times faster (insn). Reading an A/D value or an
DIO takes now only 2ms or less. The trick is that the in endpoint is already
filled when the request is issued.
Fixed a bug in the FIFO resets.
Second counter did not count properly. That's fixed. Also
found two missing syncdelays.
The new hotplug script uses comedi/usbdux.c for firmware upload and not fxload
any more. fxload is too unreliable and seems to be missing or different among
different distros. All users of usbdux boards report problems which are fxload
related. The new hotplug script simply uses comedi_config -i firmware.hex. This
fix also removes problems with the usbdevfs (race in 2.6, sleep, ...). The
usbdevfs is no longer needed.
Bugfix version of the firmware. When running ./cmd and ./ao_waveform at the same
time I got CRC errors on the USB. Reason: some registers in the FX2 need a
syncdelay. After a write to a register no other write is allowed to any other
register for a certain time. This is called "Syncdelay". Introduced syncdelays
for all EP registers. Now the CRC errors are gone.
Another bugfix: the byte for the CPUCS register was wrong (shifted one bit to
the left). This resulted in undefined processor speed. The speed was chosen just
by chance at power up (12Mhz,24Mhz,48Mhz).
Had to change the USB 2.0 transfer protocol from IRQ transfer to ISO transfer.
Reason: IRQ transfer is still not stable (2.4/2.6). However, ISO transfer has
been rewritten in the kernel and works (just now in 2.6 but will be backported
sooner or later)!
I supply new firmware and a new version of the driver which now uses ISO
transfer throughout (1.1 / 2.0).