Conversation
|
Pardon the additional commit... I was unable to get the popular esp32_243sS028r, aka "cheap yellow board" or CYB touch working without resorting to adding the swapxy option that many other drivers seem to have. With this here, it now works nicely. |
|
The driver code for the CST816 class is basically the same and can actually be extracted. The _ChipIDValue can be set as a parameter. For example, my T-CameraPlus-S3 uses the CST816D, so changing the _ChipIDValue to 0xB6 works. |
|
Note that the driver currently already has: and So I would kindly propose @gitcnd to modify that driver, just add a _ChipIDValue3 of 0xB7, make the pull request and done :-) And maybe also rename the file from cst816s.py to cst8xx.py and add a comment to clarify that it supports 816S, 816D and 820? |
|
I am not opposed to having separate drivers as this makes it a bit easier for a user to use. However I am going to suggest that we do what is done with the focaltech drivers where there is a base class that can be used across multiple models. This requires a litle bit more work as the build script will need to be adjusted to also freeze the base class file into the firmware. It's not hard to do just requires more work to do it. |
This is essentially the same as the CST816S driver, but with the Chip_ID being 0xB7 instead of 0xB5.
It is tested and working (code and screenshots here: #278 )