Skip to content

Commit c370e5b

Browse files
authored
Merge pull request #19 from makermelissa/master
Improve the error message when it fails to read the version in SPI mode
2 parents 859518f + 69fa183 commit c370e5b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adafruit_stmpe610.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ def __init__(self, spi, cs, baudrate=1000000):
278278
version = self.get_version
279279
if _STMPE_VERSION != version:
280280
raise RuntimeError(
281-
"Failed to find STMPE610! Chip Version 0x%x" % version
281+
"Failed to find STMPE610! Chip Version 0x%x. "
282+
"If you are using the breakout, verify you are in SPI mode."
283+
% version
282284
)
283285
super().__init__()
284286

0 commit comments

Comments
 (0)