[BRLTTY] Linux-specific code for USB support

Alex Bernier alex.bernier at free.fr
Tue Jul 22 02:48:43 EDT 2008


Hello,

I am currently writing the USB support the Eurobraille Esys brialle device.
The Esys use HID (a class of USB). When a HID device is plugged, the
"usbhid" kernel module claim this device. To be able to use the device in
BRLTTY, it's necessary to detach it. Detaching the device is not necessary
when using other OSes like *BSD.
How can I add Linux-specific code in BRLTTY ? Is there a specific "#define" 
which ensure that we are under Linux ? If not, maybe a solution would be to 
add an "detach_usb_device" function in usb_linux.c, usb_bsd.c, usb_darin.c... 
which is empty for all except for usb_linux.c. What is the best way ?

Regards,

Alex



More information about the BRLTTY mailing list