LCDproc development and user support list

Text archives Help

[Lcdproc] questions about required API functions in a new driver

Chronological Thread 
  • From: lucianm AT (Lucian Muresan)
  • Subject: [Lcdproc] questions about required API functions in a new driver
  • Date: Fri Mar 18 12:21:02 2005


I'm getting closer to finishing my graphlcd-base "meta-driver" for
LCDproc 0.5 and am wondering about some of the functions a driver should
have, if they apply for my driver, too:

MODULE_EXPORT void glcdlib_set_char (Driver *drvthis, int n, char *dat);
Is this one needed for other things than driver-internal stuff like
storing custom chars (icons) at the first 8 or more character positions
in the ASCII table, generating big numbers and vbar/hbar? I have
different solutions (as I deal with actually graphic displays) for any
of these tasks, so is there something I forgot? Could a client set such
a custom character?

MODULE_EXPORT char * glcdlib_get_info (Driver *drvthis);
Is this used for something?

MODULE_EXPORT char glcdlib_getkey (Driver *drvthis);
My display has no keys, and I do not know about others supported by
graphlcd-base, but if required, this will be added in future (depending
also on the support for this kind of stuff in graphlcd-base, which is
absent at the moment);

Others like cursor or heartbeat are handled by the server core via my
own implementation of glcdlib_icon(..).

What about backlight/brightness/contrast stuff? I only found that there
is actually one function drivers_backlight( int brightness ) in
drivers.c which calls the _backlight( int on) function of dthe actual
drivers if they implement it. What confuses me, is that the argument is
called brightness (suggests a quantization), but is used as some kind of
on/off/blink state in some drivers and in render.c, and on the oher hand
some of the drivers even implement such a function for contrast, which
is not part of the API.
Graphlcd-base implements in it's API a brightness (int percent) method,
which I use in my driver at initialization (reading the setting from
LCDd.conf). Now, what should I do with the backlight? sould I implement
2 different values of *brightness* as on/off states for the
LCDproc-backlight, and even some kind of blinking (maybe through inversion)?

Actually, glcdlib_set_char(...) is the one I'm concearned of most, but
if my assumptions are right, it's not necessary to export it in my case.

Anyway, my feeling is that all these can also grow over time, the driver
already has a usable functionallity whithout them anyway...


Archive powered by MHonArc 2.6.18.

Top of page