Add option for IRQ pin to wait for _read #19
Merged
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.
This is to help resolve crashes during writes/reads, from issue.
I added a connection to the IRQ pin of the (TFT display breakout) and polling it before the write cycle, and that seems to resolve the issue.
Here's the updated setup in my
code.py
file:Here's my code change to the FocalTouch library. I add an
irq_pin
in the initialization. Then in the_read
I wait for theirq_pin
to go low before sending the write command.One issue: I had to eliminate the need to check for IRQ during initialization, because the display would hang in the
Adafruit_FocalTouch.__init__
function while waiting for a touch interrupt. So, I ignore the interrupt in theinit
function, but require it for all other reads.