[Nut-upsdev] new TSSHARA SOHO II ups
Arjen de Korte
nut+devel at de-korte.org
Thu Mar 25 19:34:42 UTC 2010
Citeren USUARIO INICIAL <spenen op ig.com.br>:
> My question is: Can I add a new element called *set_interrupt at the bottom
> of usb_communication_subdriver_s struct ?
No. Although some other drivers 'abuse' this (mainly for the open and
close functions), this is not recommended.
> I'm asking this because a change on that structure will affect all USB
> drivers.
We certainly don't want that. The only things that you may wish to use
from this structure is the open and close functions. These will be
moved into usb-common.[ch] in the not so distant future. For the
remainder of the communication read up on the usb_interrupt_read and
usb_interrupt_write functions from the libusb-0.1 API:
http://libusb.sourceforge.net/doc/functions.html
> Another obtion would be to handle USB communication inside the driver
> itself...
That would be a huge waste of effort, given the fact that libusb is
widely available. Don't hesitate to post/discuss whatever you already
have on the mailinglist.
Best regards, Arjen
--
Please keep list traffic on the list
More information about the Nut-upsdev
mailing list