-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Lilygo TTGO T-Display ESP32 with 4Mbyte flash chip #8787
Conversation
The CI found a duplicate creation ID, you'll probably want to change CIRCUITPY_CREATION_ID to be something like 0x00320004 (https://github.com/creationid/creators/blob/main/creations/lilygo.md). You'll also want to make a PR against https://github.com/creationid/creators to add the new creation ID. From the How to add a new Board learn guide: Creator/Creation IDs |
Thanks! Pull request for creation_id Once approved I'll update this pull request. And when merged will add a description to the circuitpython.org website |
Should these changes also be made on the original board? |
The related merged pull request is creationid/creators#52
If I get a thumbs-up I can create a respective pull request. I think all 3 changes would make sense. Don't have a 16M board to test it, though. |
The button name change (if made on the 16M version) could break existing code although this PR is against MAIN so it may not show up until 9.x, that being said, the only board that uses BUTTON0 and BUTTON1 is the LIlygo_t_display_esp32_16m. BUTTON1/2/3... is used by a few NRF boards. BUTTON_L/BUTTON_R is only used by the Lilygo_t_display_rp2040 but I'm not sure the L/R (presumably Left/Right) have much meaning for that particular board layout. Several other boards do use BUTTON_LEFT/BUTTON_RIGHT. I don't think the button name is a big deal but if I were making the decision, I would make the 4M version of this board match the existing BUTTON0/BUTTON1 used by the 16M version. I know that means that code written for the RP2040 version needs extra logic to work on the ESP32 version but that is an existing issue (between the rp2040 and esp 16M versions) and standardizing the two ESP boards seems more important. My second choice would be to add both aliases to the two ESP boards. |
As mentioned by @RetiredWizard in adafruit#8787 (comment) it is best to keep the old descriptors
Button renamed to original version for 16M edition. Indeed, it's not a big deal and best not to break code. Users will probably use some |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
As mentioned by @RetiredWizard in adafruit#8787 (comment) it is best to keep the old descriptors
Technically it only needs a change of one line in mpconfigboard.mk with the adjusted
CIRCUITPY_ESP_FLASH_SIZE = 4MB
and now CircuitPython runs on versions with a smaller flash chip. I have several boards here and they are still available to order.While at it I changed the init sequence for the display with an adjusted MADCTL to
0x60
(instead of0xC0
to get therotation=0
and a refresh of the display from to to bottom.0x68
causes inverted colors when usingdisplayio.Palette()
so I kept bitD3
of MADCTL at zero.And I added the missing pins
GPIO36
andGPIO39
even though they can only be used as input. And renamed the buttons toBUTTON_L
andBUTTON_R
to be consistent with the rp2040 version of this board.