|
Post by TravisCrash on Jan 20, 2020 10:43:34 GMT -8
Hello, I would like to get the GD2 Library running with an esp32(adafruit Huzzah32) and FT813 (NHD-4.3-480272FT-CSXN-CTP) display(Sorry I didn't know about gameduino until after I purchased the display.) 3rd party display aside, I am hoping you'll be willing/able to help me. Some questions: - Do I need to edit the library to tell it I am using an esp32? Or does the Arduino IDE tell GD2 what board is chosen from the Tools>Board: menu?
- To use the library with an esp32, do I need to set up VSPI/HSPI in the sketch? Or does GD2 handle setting up the SPI for esp32 already?
- I see cs in
- Since the display is not the official gameduino/2/3/3x, do I edit GD2.h line 47 from what it currently says "#define BOARD BOARD_GAMEDUINO23" to "#define BOARD BOARD_FTDI_80X" or to "#define BOARD BOARD_OTHER"?
- When calling GD.begin() should I still use GD.begin(0), or do I use GD.begin(x)? where x is some other integer corresponding to the BOARD I selected in GD2.h?
- To setup the display timing registers for my 3rd party display, do I use "GD.wr16(REG_XXXX, xxx);" like is shown here at the GD2-lib FAQ or do I use GD.wr32(REG_XXXX, xxx)" I see both wr32 and wr16 in the library files. Alternatively, would it be better for me to edit the screen registers somewhere in the library instead of in the setup() section of my sketch after GD.begin()?
- Should I be using the files from GitHub? or from excamera?
I hope your day is going well! -Travis
|
|
|
Post by jamesbowman on Jan 20, 2020 18:07:13 GMT -8
1. Other 32-bit targets, including esp8266, are supported, so I think esp32 should "just work".
2. SPI is initialized inside "transports/wiring.h" If the esp32 SPI looks like standard Arduino SPI, then it also should "just work"
4. Right, "#define BOARD_OTHER" is what you want
5. Yes, GD.begin(0) is a good start. The flag to GD.Begin() does not specify the board, just whether you want to also initialize storage. In this case, 0 means no storage.
6. GD.wr16() is fine for the display setup, because all those registers are 16-bit or less. I recommend doing this explicitly in setup().
7. github is a better choice. Then if you make a pull request for esp32 I can add them to the library. Which would be awesome btw.
|
|
|
Post by TravisCrash on Jan 24, 2020 21:41:22 GMT -8
Hi James, Thank you for the guidance and answering all my questions. I'll grab the library from GitHub and give the suggestions a shot!
|
|