Skip to content

Improve the error message when it fails to read the version in SPI mode #19

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

Merged
merged 1 commit into from
Apr 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion adafruit_stmpe610.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ def __init__(self, spi, cs, baudrate=1000000):
version = self.get_version
if _STMPE_VERSION != version:
raise RuntimeError(
"Failed to find STMPE610! Chip Version 0x%x" % version
"Failed to find STMPE610! Chip Version 0x%x. "
"If you are using the breakout, verify you are in SPI mode."
% version
)
super().__init__()

Expand Down