OK, so here are my comments. It took me so long to write.
inmarket wrote:Include the low level driver header using a generic name near the top of the high level header file. This is similiar to the other CibiOS drivers. The make system determines which low level driver & header is actually included.
A very valid Point, we'll consider it in the next LLD revision. I'll talk about it in a new topic.
inmarket wrote:Define a few macros that handle the PIXEL types and format conversions...
I've used the Nokia 6610 LCD and I know about RGB444P and RGB332=8bpp. I guess we'll define a color_t datatype, and replace it everywhere we have uint16_t. The LLD will define the alias for color_t, RGB332 would use uint8_t, RGB444P and RGB565 would be using uint16_t, and a macro RGB(r,g,b) accordingly to convert from RGB888 to the particular BPP instead of hardcoding. Then the LCDs we're using also support an 18-bit mode - RGB666. This, along with RGB888 (24-bit format) will expand color_t to uint32_t.
Then all standard colors can be mapped using a RGB Macro e.g. RED => RGB(255, 0, 0) , and so on. It'll be considered in the LLD revision I talked about.
inmaket wrote:Define a bunch of GLCD_NEED_XXX macros ...
If I'm not using a worker thread, only those functions will be linked which are being used. The ChibiOS makefile has option of -function sections and data sections per function and variable. This way the linker can clean up dead code. Similarly for the fonts. If you're not using some font in code, you'll be sure that it'll not be linked into the final file [try it out and see].
However, in case you're using a worker, this will fail. So in that case, we may use switches. [However, considering that in the current state a lcd set pixel takes, say, 1us, and messaging will lead to two context switches, increasing the time to 3us (Context Switch in ChibiOS is around ~1us @ 72MHz)]. So I think concept of workers might not be useful at the lowest level for simple applications. Badger has said, he'll implement it. So issue is somewhat sorted.
For graphics algorithms, as of now, I don't know exactly which algorithm are we using for circle, ellipse, and lines. But it could be useful at a later stage, if not now. I would leave it as it is for now.
About character LCDs, I don't know why you would like to use them with an ARM processor, when you can easily use a color LCD. Secondly, the data accesses to those LCDs will involve blocking the processor for several microseconds or even milliseconds for the write to complete, which is considerable amount of clock cycles for ARM processors, which will be going waste [of course an RTOS may help in this case, but still, will require some effort in driver design, maybe something like a queue]. So I don't think they'll be supported. Dot matrix graphics displays might be supported, but at a very very late stage.
However even at some point I raised a point of separating the text rendering functions from the main lib. We'll see. Also, agreed to the proposal of making the setWindow LLD.
To be very frank, when I (or Tectu) started working this lib, our aim was just to write a lib for our particular LCDs which we use. Then Tectu thought it might be a better idea to create a shared codebase so that anybody wanting to use those LCDs (they're pretty popular on eBay) wouldn't have to reinvent the wheel when they get themselves one. So came the low-level drivers for SSD1289, S6D1121, (SSD1963 is under development, @mobyfab: what's the status? ). And gradually we'll genericise the whole thing for different LCDs and resolutions, it's a kind of top-down approach as compared to a bottom-up approach [so that the lib is usable even at this stage, but can get much better], so we're always looking for ideas or suggestions to improve this lib and make it more generic and universal.
So I think that's all I can say right now, the coding will follow hereafter. If anyone [Badger, Tectu, Giovanni, and others on this forum] would like to point out/differ in opinion in something in this, most welcome.
Best Regards
Abhishek