FTaylor Posted February 14 Report Posted February 14 Hello there! I am fairly new to uGFX and would like to prototype on my Arduino Portenta H7 (or other arduino variants). However I am having trouble with how to define the pin layout for my external ILI9341 display. According to the github project example (GitHub - crteensy/ugfx-arduino: How to use ugfx in arduino. Libraries and example sketch), there is a .cpp file which defines the pins for the SSD1351. should I also do this for my project, or can I just define them within the INO script. obviously here I am using Arduino IDE. I am aware that the Portenta H7 runs MBedOS, which cuurently isn't supported by uGFX, so I am happy to switch to another board if needed, I just need to get these Pins working! Kind Regards FT
Joel Bodenmann Posted Monday at 09:09 PM Report Posted Monday at 09:09 PM Hello & Welcome to the µGFX community! µGFX accesses display hardware via the so-called "board file". Each display driver has a file named board_xxx_template.h where xxx is the driver name. In your case, that would be /drivers/gdisp/ILI9341/board_ILI9341_template.h. Simply copy that file to your project and rename it to board_ILI9341.h. In that file, you will find the various functions the driver needs to access on the hardware/peripherals to talk to the display controller - you'll have to implement those functions to work with your ecosystem (i.e. Arduino) and your hardware. So technically, that is where the pin assignments go. You can find an example under boards/addons/gdisp/board_ILI9341_spi.h While that is written to work with ChibiOS, it should still give you an idea of what you need to do (toggle GPIOs, make SPI transactions etc). As for the repository you linked - That seems to be 10 years old. I am not saying it won't work, but also from an understanding/learning perspective, it might be best if you start from scratch and import whatever you need. Please don't hesitate to ask if you have any questions - we're happy to help wherever we can.
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