GLCD and Touchpad Library

Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

Re: GLCD and Touchpad Library

Post by Abhishek »

For text rendering, I was considering if my architecture could help with text rendering. Looks like the library doesn't support newline characters.

I have two global fields: fgcolor and bgcolor, and a software address counter: cx, cy especially for text rendering.

You can check my code at:
https://github.com/abhishek-kakkar/STM3 ... /CLCD_QVGA
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: GLCD and Touchpad Library

Post by Tectu »

I know that my actual solution of the text rendering is very bad. It was just a quick'n'dirty, half copy'n'paste work of mine, to print some informations for debugging on there.

As suggested in the PM, I'd really like if you'd merge your text rendering.
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: GLCD and Touchpad Library

Post by Tectu »

Okay, Abhishek and me had some serious background PMing. He added now a second driver, for a S6D1121 controller. It was a kind of a pain until everything worked, but I can say now: Everything works great! We have two different drivers as templates there, and choosing them over glcdconf.h works great!

Please feel free to try one of the two existing drivers, or write one for your controller on your own.


~ Tectu
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: GLCD and Touchpad Library

Post by Badger »

I've had a quick look through the code and it looks like good progress is being made, but I think we should review the structure.

I see at the moment both touchscreen and display drivers are put in the 'drivers' directory. I think we would do well to have separate directories for each component.

I also think it could be a good idea to separate out the 'hardware' and the 'GUI' aspects. This is already mostly done in the source files, but if they were separated in the directory structure it would provide a clearer distinction. In my mind this would allow for both simple and complex GUI libraries to use the same underlying hardware API. As an analogy I would compare it to Xorg as the 'hardware' API, and Gnome / KDE as the 'GUI' layer.

There is obviously currently no separation of the interface layer (seems to currently be a soft FSMC style implementation for ssd1289 and SPI for ads7843), but that is a topic for discussion here
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: GLCD and Touchpad Library

Post by Badger »

I'm trying to reorganise the code a bit, but when I compile I get:

Code: Select all

chibios/ext/lcd/drivers/ssd1289_lld.h:5:22: fatal error: glcdconf.h: No such file or directory


is glcdconf.h supposed to be included in the repository? or added myself?
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: GLCD and Touchpad Library

Post by Tectu »

oh snap! I forgot to git add that file. I always forget that.

I am at school and don't have my notebook here. I'll push it at the evening.


You can make the file yourself, it dosen't contain that much yet.

glcdconf.h

Code: Select all

#ifndef GLCDCONF_H
#define GLCDCONF_H


/*** LCD CONTROLLER ***/
#define LCD_USE_SSD1289
//#define LCD_USE_S6D1121


/*** TOUCHPAD CONTROLLER ***/
#define TOUCHPAD_USE_ADS7843

#endif



~ Tectu
Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

Re: GLCD and Touchpad Library

Post by Abhishek »

I suppose we don't need to push that file into the repository. It could be included with every project, just like we include chconf.h, halconf.h or mcuconf.h.
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: GLCD and Touchpad Library

Post by Tectu »

We need to provide a template for the user. The file deffintly belongs into the repository. When you take a look to a project like elm-chan's FatFS, he also gives you the template for the ffconf.h, dosen't he? ;)


~ Tectu
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: GLCD and Touchpad Library

Post by Badger »

We should have some demos. These can include the file.
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: GLCD and Touchpad Library

Post by Tectu »

I'll write some demos tonight.
Locked