[Nut-upsdev] NUT and libhid

Charles Lepple clepple at gmail.com
Tue Aug 14 03:06:27 UTC 2007


On 8/6/07, Peter Selinger <selinger at mathstat.dal.ca> wrote:
> How is the support for interrupt transfers in libhid? That's an area
> where a clean interface and abstraction would be very useful.

Primative at best - just a wrapper around libusb at the moment. I
agree - that needs to be cleaned up.

> The library should run a separate thread to collect interrupt transfers,
> which can then be polled through the API. (For NUT, there is not point
> in receiving interrupt transfers in real time, as there is no way to
> "push" them from the driver through upsd to the client).

I'm still not totally up to speed on all of the intricacies of POSIX
threads (especially regarding globals, and passing information between
them). At one point, I think we discussed letting the calling program
start the thread, and just providing an entry point (the thread's
"run()" function) that the calling program could pass to whatever
threading API it uses.

This would all take a lot more effort than I originally imagined. But
it's good information for me to keep in the back of my mind as I
update libhid.

-- 
- Charles Lepple



More information about the Nut-upsdev mailing list