Viacheslav Posted August 23, 2019 Report Share Posted August 23, 2019 Hello! Hello! I want to write my display driver for uGFX My display on the microcontroller otm8009a is connected via a 16 bit parallel bus to stm32f407ve via FSMC. Using the cube, I generated the FSMC initialization code. I have addresses in the memory of the microcontroller: #define LCD_REG 0x60000000 #define LCD_DATA 0x6007FFFE I wrote the initialization of the display controller and in the end I have a working functions like: void LCD_DrawPoint(uint16_t x, uint16_t y, uint16_t color) //color in RGB565 { LCD_SetWindows(x, y, x, y); LCD_DATA = Color; } void LCD_Clear(uint16_t Color) { unsigned int i; uint32_t total_point = width * height; LCD_SetWindows(0, 0, width - 1, height - 1); for(i = 0; i < total_point; i++) { LCD_DATA = Color; } } Help me please understand how I should write a driver for uGFX. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted September 2, 2019 Report Share Posted September 2, 2019 Hi, The best way to get started is by reading the corresponding wiki article: https://wiki.ugfx.io/index.php/Display_Driver_Model You might also want to take a look at the countless examples in for of existing drivers which you can find in the /drivers directory in the library. If you have any specific questions you can always ask here on the forum - we're happy to help where we can. Link to comment Share on other sites More sharing options...
Viacheslav Posted September 3, 2019 Author Report Share Posted September 3, 2019 (edited) As a novice programmer, it was hard for me to figure out how to write a driver. As a result, I managed to write a driver and my display came to life with new colors. Now I will take the time to put the driver code in order and implement additional functions. I would also like to share the driver for this display. What is the best way to do this? Thanks for the great graphics library! Edited September 3, 2019 by Viacheslav Link to comment Share on other sites More sharing options...
inmarket Posted September 7, 2019 Report Share Posted September 7, 2019 The easiest way is to attach the driver as a zip file to this forum thread. If you wish you can also create a pull request on the main uGFX git repository. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted September 7, 2019 Report Share Posted September 7, 2019 nice. happy to hear that you got it working - good job! Link to comment Share on other sites More sharing options...
Viacheslav Posted September 20, 2019 Author Report Share Posted September 20, 2019 Thank! This is tested and works for me. Maybe I didn’t figure it out completely and something needs to be rewritten or added. I will be waiting for your comments. forum_ugfx_otm8009a.zip Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted November 4, 2019 Report Share Posted November 4, 2019 Glad to hear that you got it working - Thanks for sharing with the community! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now