[Lcdproc] picoLCD improved key input

Markus Dolze bsdfan at nurfuerspam.de
Thu Oct 13 17:14:35 UTC 2011


On 19.08.2011 20:32, Martin T Jones wrote:
> Hello,
>
> I agree, drivers should be self-contained. I only include main.h for
> PROCESS_FREQ which is used to convert the auto-repeat times to counts
> for use in get_key, perhaps it should be moved to a shared header.
>
> Initialisation &  de-initialisation of libusb-1.0 is quite
> straightforward and only needs to move somewhere common to support
> multiple USB drivers.
>
> The only "FIXME" that needs some thought is the one in main. My code
> is very simple and works well for a single driver but this really
> needs to be done properly,
> the libusb-1.0 documentation is quite good, see my comment for where
> to look.
>
> Martin

Hi Martin,

I got time to look at this again.

The libusb-1.0 (de)initialization and processing of asynchronous
messages should really happen somewhere within LCDd if multiple drivers
use libusb-1.0.

For now I'd like to commit it 'as is', but with handling of asynchronous
messages moved to picolcd_get_key(). Why? because this moves all
libusb-1.0 stuff into picolcd and get_key() is called as often as if it
were in LCDd core.

The configure-stuff is non-portable as is the use of some libusb-1.0
functions (libusb_detach_kernel_driver). But this only affects FreeBSD
and I may fix that later.

Regards
Markus



More information about the LCDproc mailing list