Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

New touch driver: CST820#280

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
gitcnd wants to merge3 commits intolvgl-micropython:main
base:main
Choose a base branch
Loading
fromgitcnd:new-touch-driver

Conversation

@gitcnd
Copy link

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 )

@gitcnd
Copy link
Author

gitcnd commentedFeb 3, 2025
edited
Loading

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.
Code and screenshots here:#281

@yusuhua
Copy link

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.
https://github.com/esphome/esphome/blob/dev/esphome/components/cst816/touchscreen/cst816_touchscreen.h

@ThomasFarstrike
Copy link
Contributor

ThomasFarstrike commentedOct 10, 2025
edited
Loading

Note that the driver currently already has:

_ChipIDValue = const(0xB5)_ChipIDValue2 = const(0xB6)

and

if chip_id not in (_ChipIDValue, _ChipIDValue2):

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?

@kdschlosser
Copy link
Collaborator

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.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@gitcnd@yusuhua@ThomasFarstrike@kdschlosser

[8]ページ先頭

©2009-2025 Movatter.jp