Repository navigation
Merged
Conversation
…uitPython driver copies A CircuitPython board config that imported gt911, chsc6x or cst816 got the MicroPython driver from its package.json (or nothing, for cst816), which fails to import on CircuitPython. The installer generator now takes a driver's copy under drivers/<kind>/circuitpython/ when there is one. drivers/touch/circuitpython/gt911.py is new: it polls the GT911 over a busio.I2C, pulses an optional reset line, and finds the controller at 0x5D or 0x14. The Touch-LCD-4B's config mirrors x, as its MicroPython config does. Fixes #721.
Contributor
Author
|
Run on a Touch-LCD-4B (ESP32-P4 v1.3) under CircuitPython 11.0.0-alpha.3, the cp-p4-panel image from PyDevices/omnipython-builds#579, with this branch's |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On CircuitPython, the Touch-LCD-4B's board config stopped at
import gt911: its package installed the MicroPython GT911 driver, which importssleep_msandmachine. The same happened to every CircuitPython config whose driver has a CircuitPython copy underdrivers/touch/circuitpython/: the Seeed Round Display configs got the MicroPythonchsc6x, and the RP2040-Touch-LCD-1.28 config got nocst816at all.libbuild.py installersnow installs a driver's CircuitPython copy when there is one (Adafruit's own libraries still come from the bundle). The newdrivers/touch/circuitpython/gt911.pypolls the GT911 over abusio.I2C, pulses an optional reset line, finds the controller at 0x5D or 0x14, and offers bothread_points()and thetoucheslist the four GT911 configs read. The Touch-LCD-4B's config also mirrors x, as its MicroPython config does.libbuild.py checkandinstallers --checkpass, and so do the libbuild tests, including a new one that fails on the old generator. The board run on a Touch-LCD-4B under CircuitPython follows in a comment. The other GT911 configs (Tab5, the two i.MX RT boards) and the CHSC6X and CST816 configs aren't run on hardware here.Fixes #721.