SSD2119 driver

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: SSD2119 driver

Postby Tectu » Tue Mar 05, 2013 10:06 pm

Here we go :D
Thanks for the nice contribution!


~ Tectu

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: SSD2119 driver

Postby Tectu » Thu Mar 07, 2013 6:05 pm

I just received my own embest board. You driver works out of the box, nice work!
Could you please share your boardfiles for the EMBEST thing? I'd like to put them up here.


~ Tectu

resset
Posts: 32
Joined: Thu Dec 20, 2012 11:57 pm
Location: Poland
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: SSD2119 driver

Postby resset » Thu Mar 07, 2013 11:18 pm

To be honest I didn't make one yet... For now I just used ST_STM32F4_DISCOVERY board files.

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: SSD2119 driver

Postby Tectu » Thu Mar 07, 2013 11:48 pm

No problem, thanks for the information!
Did you do anything yet to get the touch controller working? I just implemented the basic, empty structure and I will push it to the repository now. I need to go to bed ;-)


~ Tectu

resset
Posts: 32
Joined: Thu Dec 20, 2012 11:57 pm
Location: Poland
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: SSD2119 driver

Postby resset » Fri Mar 08, 2013 12:13 am

Not yet, unfortunately. This was a busy week for me.

Thanks for sharing:) As soon as I do anything I will let you know for not to double the work.

I may not be as fast as you/others since I am still learning ChibiOS/GFX and ChibiOS/RT. As I suppose, board files for this board should be mostly like the ST_STM32F4_DISCOVERY, but supplemented?

Another question: in SSD2119 I used BOARD_EMBEST_DMSTF4BB_FSMC constant to refer to the board. But when in GINPUT, what should be used? Especially, _FSMC suffix doesn't fit. Maybe we should remove it and stay with BOARD_EMBEST_DMSTF4BB both in GDISP and GINPUT? I would also use it for driver files' names. But please clarify:)

Mateusz

resset
Posts: 32
Joined: Thu Dec 20, 2012 11:57 pm
Location: Poland
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: SSD2119 driver

Postby resset » Fri Mar 08, 2013 2:17 am

I made a small file with STMPE811 registers addresses, just like in SSD2119 case. I also changed board file name to what I was referring to in previous post. Not sure if it is okay, so please look at the changes. Everything is in #41 pull request.

Mateusz

inmarket
Posts: 89
Joined: Fri Jul 27, 2012 1:37 pm
Location: Brisbane, Australia

Re: SSD2119 driver

Postby inmarket » Fri Mar 08, 2013 3:20 am

The appropriate board name is BOARD_EMBEST_DMSTF4BB. The FSMC is just the way you have implemented the connection to the LCD in your board file.
For some situations there may be several board files for the one board each with different connection details.

Eg.
Imagine a fictitious LCD controller called XYZ which can be connected to your board (a "ABC" board) via either FSMC or SPI.

You would then have two board files gdisp_lld_board_abc_fsmc.h and gdisp_lld_board_abc_spi.h in the XYZ driver directory.

In your XYZ gdisp_lld.c you would have something like...

Code: Select all

#if defined(GDISP_USE_CUSTOM_BOARD) && GDISP_USE_CUSTOM_BOARD
   /* Include the user supplied board definitions */
   #include "gdisp_lld_board.h"
#elif defined(BOARD_ABC)
   #include "gdisp_lld_board_abc_fsmc.h"      /* FSMC and SPI supported - FSMC is the default */
#else
   /* Include the user supplied board definitions */
   #include "gdisp_lld_board.h"
#endif


A person using the SPI connections would just alter the "_fsmc" to "_spi" in gdisp_lld.c.

Alternatively (and preferably) they would copy gdisp_lld_board_abc_spi.h to their project directory and rename it gdisp_lld_board.h and then define GDISP_USE_CUSTOM_BOARD in their gfxconf.h. This method is also the preferred method if you have a non-standard connection to a controller eg use port 3 instead of port 1 as it allows custom hardware interfaces without having to modify the ChibiOS-GFX master source. You are just defining an "over-ride" board file in your project that can be edited as you need based on the template of an existing board file (or not).

Hope that helps.

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: SSD2119 driver

Postby Tectu » Fri Mar 08, 2013 5:41 am

@resset: Thank you very much for supplying us with the STMPE811 register definition header, this is very helpful! I did merge your pull request. The rename of the file as inmarket explained is correct. I saw that the previous one wasn't the way it's supposed to be but I waited to change it because I didn't know yet if you really do have board files for the EMBEST_DMSTF4BB yet.
Also, please don't worry at all how fast you are compared to others. Currently, I am _very_ busy with my dayjob and my education so I don't really have time to do anything. Beside that, I'm still not that familiar with ChibiOS/RT myself, sometimes. Just a few weeks after I first tried out ChibiOS/RT, I begun the work on ChibiOS/GFX and since then I never really found anything where I could discovery and explore all the deep internals of it :D

@inmarket: Accurate as always ;-) I am still not sure if the thing with copying the board file to gdisp_lld_board.h and then use the GDISP_USE_CUSTOM_BOARD macro is the way to go. I guess forcing people to use a sane board file name would keep things cleaner (unless they just fill out the example.h).


~ Tectu

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: SSD2119 driver

Postby Tectu » Fri Mar 08, 2013 9:41 am

I have dropped the FSMC stuff in the board #define as well as in the board file name. The embest board only supports FSMC so this becomes obsolete. The reason behind the board files is that you don't have to do that because most boards only have one interface available. We had the GPIO, FMSC, SPI stuff before we had the board files and it was a real mess.


~ Tectu

resset
Posts: 32
Joined: Thu Dec 20, 2012 11:57 pm
Location: Poland
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: SSD2119 driver

Postby resset » Fri Mar 08, 2013 3:03 pm

Thanks inmarket, thanks Tectu - I got it:) Thanks for merge. I think at the weekend I'll find time to look at STMPE811. Any progress will be published.

Mateusz


Return to “LCD Driver and Graphic Framework”

Who is online

Users browsing this forum: No registered users and 0 guests