From: Michael R. <re...@eu...> - 2004-01-09 17:18:04
|
It has happened: I decided to start with the new driver architecture, which will use the Evaluator, and will support widgets. I've been worrying for a long time how to start, and I had some other wishes which I didn't know how to do: for example, how to get a better naming convention into the source files (I want to keep them in one directory as long as possible). Anybode has an idea how to rename files when using CVS? Now I'm goint the following way: I will introduce some new files, while keeping the old ones up and running. As far as the new architecture has at least the same level of functionality as the old one, I will start to drop the old files. At least I hope this works... I started with drv.c and drv.h, which is the framework for all display drivers, and will someday replace 'display.c'. Next I created an almost empty 'drv_MatrixOrbital.c'. You see, all drivers will have this 'drv_' from now on. The new architecture has a seperation of drivers and models, where the old one only knew models (a model is what you specified in the config file as "Display") A new driver has far less functions than the old ones, to be exactly, three as of now: list() lists all supported models of this driver (for the output of lcd4linux -l) init() initializes the driver if it has to know what exact type of display it should serve, it's the driver's task to ask in the config file quit() deinitializes the driver There are no more put(), bar() and so on functions anymore, but the driver will register the widgets he offers. Every driver has to register a "text" or "label" widget, but nothing more. Think of a text-only display without user-defineable chars: there are no bars and no icons. A fully-graphics display can offer a lot of differet widgets, OTOH. This is how the config file will look like: Display "TheBigOne" { Driver MatrixOrbital Model LK204-25 Port /dev/usb/tts/0 } Display "TheSmallOne" { Driver HD44780 Port /dev/parport/0 Size 16x1 Wire { EX INIT } } Display "TheBigOne" Note that you don't have to uncomment all the displays you don't have. Just select a "section"! Stay tuned! bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |