- From: kristofer hansson <kristofer.hansson_at_gmail.com>
- Date: Thu, 3 Nov 2005 15:47:08 +0100
Hi
Question:
'How do can I make the detachment of unplugged usbduxes from their
filedescriptors /dev/comediX automatic when an usbdux is physically
unplugged. Currently the association still exists and is only fully detached
when plugging in a new usbdux which makes the hotplug scripts run. It's
probably the COMEDI_CONFIG -r /dev/comediX calls that needs to be invoked,
but how/where do I configure this?
Description:
Im using the hotplug script in order to register a new usbdux when plugged
in. When unplugging an usbdux device while running my application
usb.cnotices that a device has been disconnected and i see the lines
comedi_: usbdux: tiding up
and
comedi_: usbdux: disconnected from the usb
Before each acquisition in my application I close the filedescriptors and
reopen them in order to check that they are still valid, the problem is that
when I unplug a device the call to comedi_open("/dev/comediX") still returns
a !=NULL file handle.
When I plug a new usbdux the hotplug scripts are called and in the next
acquisition in my application the filedescriptors for the device previously
unplugged are fully detached. I want this to be done when unplugging, not
when plugging in a new device.
Best regards
/Kristofer Hansson
Received on 2005-11-03Z14:47:08