GDISP driver

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

Re: GDISP driver

Post by Badger »

the interfaces for S6D1121 and SSD1289 are the same; they could both use common code. I propose we create header only implementations of these interfaces:
  • i80_system_16_gpio.h
  • i80_system_8_gpio.h
  • i80_system_16_fsmc.h
  • i80_system_8_fsmc.h

These would contain inline functions / macros for init and the basic read/write functions. Then each lld can include one of these files depending on the interface macros.
Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

Re: GDISP driver

Post by Abhishek »

You're right Badger. Not just those two but almost all QVGA modules support that.

Once we're done I guess we could do something like a switchable driver for an entire LCD family, like say QVGA Family. True, this may bloat code but allows for protection against module chip revisions. And could be useful for commercial products too (sourcing products from multiple OEM's). Even the 6610 LCD is in two variants, it'd be nice to somehow create a lib that can seamlessly use both.

BR
inmarket
Posts: 89
Joined: Fri Jul 27, 2012 1:37 pm

Re: GDISP driver

Post by inmarket »

Abhishek wrote:If you're interested, i've a working lib for the nokia 6610 / 6100 LCD for the STM32, using hard SPI and 1 soft bit. Would you like to have it?


Yes definitely please.

Abhishek wrote:However, how did you restructure the text rendering code? Did you write some sort of script?


Wrote a program to restructure it. I will publish it if anyone is interested. Eventually I think it would be cool to have a program (win32) where you select the font you want, the size you want and it outputs the necessary definitions.

Abhishek wrote:I guess your code requires a new repo.


If the group agrees I will create one specifically for "halext" (of which gdisp is a part) which I hope to eventually have a full range of "extra" drivers for including touch, audio etc into ChibiOS. The idea of "halext" came from seeing there was no defined way of adding new non-standard drivers particularly where they weren't platform/board specific. At the moment however this would just be overhead to manage - I want to spend my available time in coding.
In practice I think it is probably good that GDISP and GLCD are in the same repo atleast while both are in active development.
Last edited by inmarket on Tue Jul 31, 2012 1:04 pm, edited 1 time in total.
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: GDISP driver

Post by Tectu »

inmarket wrote:If the group agrees I will create one specifically for "halext" (of which gdisp is a part) which I hope to eventually have a full range of "extra" drivers for including touch, audio etc into ChibiOS. The idea of "halext" came from seeing there was no defined way of adding new non-standard drivers particularly where they weren't platform/board specific.

No problem at all. Just worrying about merging into my library then. Would you make some release stuff or something like that?

Would you even be interested in keeping track of halext inside the glcd library? You could become the maintainer of the drivers stuff.


~ Tectu
inmarket
Posts: 89
Joined: Fri Jul 27, 2012 1:37 pm

Re: GDISP driver

Post by inmarket »

For the moment lets keep things the way they are. I'm not that familiar with Github yet, I'm not sure of how much time I have to dedicate and the halext project is very young. A good time to split might be when the first non-graphics driver gets added to halext.
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: GDISP driver

Post by Tectu »

This sounds great for me. This way, I can become familar with halext too. Feel free to make a pullrequest whenever you want.


~ Tectu
inmarket
Posts: 89
Joined: Fri Jul 27, 2012 1:37 pm

Re: GDISP driver

Post by inmarket »

inmarket wrote:Wrote a program to restructure it.


Program attached to convert old fonts to the new font structure. Replace the font[] with the code for the old style font. Run the program and hay-presto you should have the code for a new style font.
Attachments
fontConvert2.zip
(2.91 KiB) Downloaded 494 times
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: GDISP driver

Post by Tectu »

Just curious... I cannot take a look since I am on the road until tomorrow. What happened to the font stuff? Afaikt nothing happened to the font stuff in the current version of the GLCD library? Do we have now more/other/better font rendering? Or is the program there to generate new stuff?


~ Tectu
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: GDISP driver

Post by Giovanni »

I see GDISP like a major subsystem rather than a simple "driver", with this premise you could just create a gdisp directory in parallel with kernel and hal under ./os rather than mixing it with other drivers under a halext directory.

Within ./os/gdisp you could have:
1) gdisp.dox for documentation related text.
2) gdisp.mk for including the portable part into a makefile.
3) src/ for portable source and include files (I am regretting having those separated in other places).
4) controllers/ with the collection of low level drivers for the various controllers, one for each subdir.
5) templates/ with the file templates to be filled for adding low level drivers.
6) Within ./os/gdisp/controllers/ one directory for each controller each with its controller.mk and controller.dox files.

I also recommend, if not done already, grouping application static settings into a gdispconf.h file to be included in the application directories.

This is what I would do while adding some other major subsystem like a FS or TCP stack.

Anyway the idea or a specific directory for platform independent drivers (like mmc_spi) is something to be considered.

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

Re: GDISP driver

Post by Abhishek »

@inmarket,

Abhishek wrote:Once we're done I guess we could do something like a switchable driver for an entire LCD family, like say QVGA Family. True, this may bloat code but allows for protection against module chip revisions. And could be useful for commercial products too (sourcing products from multiple OEM's). Even the 6610 LCD is in two variants, it'd be nice to somehow create a lib that can seamlessly use both.

BR


Would you like to give such an impl a try?

I've some audio playback code and CS43L22 drivers for the F4 discovery board. Look at github.com/abhishek-kakkar/STM32F4Player . Could it be considered for your halext?
Locked