[Lcdproc] Patch for lcd2usb
bsdfan at nurfuerspam.de
Tue Dec 21 07:05:46 UTC 2010
On 18.12.2010 17:42, Michael Zanetti wrote:
> The attached patch for hd44780-lcd2usb changes the device scanning mechanism
> of the lcd2usb driver. The original version scans for all attached lcd2usb
> devices and uses the last one found. This has the problem, that defining two
> lines "Driver=hd4478" in the config file, opens the last display twice.
> The patched version keeps track of the used devices and uses the first unused
> one. This makes it possible to use multiple lcd2usb devices on one machine and
> clone the output to all of them (e.g. for different rooms playing music using
> the same MythTV box).
> Thanks for making LCDproc!
I will not add this patch. For several reasons:
* I'd like to see code reuse. We have a linked list implementation
available as ./shared/LL.c .
* It adds a global variable to the hd44780 driver which is supposed
to not have these. The lcd2usb driver has a global buffer anyway.
This was accidentally commited and will be corrected soon.
* The global variable introduces a dependency between otherwise
unrelated instances of hd44780 drivers.
* It only addresses the situation where you have the same number of
driver instances as the number of devices connected. If one only
uses some of his devices it depends on libusb which devices are used.
One solution will be to add a unique device address to the connection
type, e.g. the USB serial number, like the bwct connection type supports
and then add a config section for each device. Unfortunately stock USB
devices do not have a serial number. It can easily be added, but
requires firmware modification for each device.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LCDproc