graaf said:
Or anyone have some hints on how to code one in gnu c++ ?
Grab the kernel source and start slashing away.
You can either directly modify the existing serial port driver or write an add-on "filter" driver that co-exists with the standard serial driver. That might allow supporting a slicer attached to USB serial port.
Add a few
ioctl extensions to the standard driver to (1) turn slicer mode on/off, (2) return the slicer's time sampling resoltion, and (3) read slicer "impulse" data from a FIFO queue. You may want to add a "flush" command to that list.
Userland application opens a serial port to issue these extended
ioctl requests. If the request fails, your new driver wasn't installed. The application would have to poll - say 3 to 30 times a second. This gives timely performance, mild CPU loading, and keeps the driver's FIFO from overflowing.
-rick