-
-
Notifications
You must be signed in to change notification settings - Fork 21
Beginning touch support #134
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
base: arduino
Are you sure you want to change the base?
Conversation
Wondering, an alternative implementation for this would be instead of having a handler here, that
|
Talking to self (and maybe others) In certain ways, I think the idea of setting a callback function like I mentioned in the previous comment, might make sense, but one thing (of many) I don't understand, is how to do that in a safe way. That is Suppose, I setup and run our example Touch Paint sketch, which registers it's callback. Then suppose I decide to run some simple sketch like blink. After Blink loads, my guess is that the callback pointer would be set to wherever it was in the previous sketch, and if the user touches the screen, we will Or is there some method we call at sketch startup that can clear the callback(s)... EDIT: One option, is maybe add the InitVariant for the GIGA, and set it to NULL at that point... |
13960d6
to
a046e8d
Compare
1251946
to
89d3fd5
Compare
…fixups.c Add a callback function for the touch device within the fixups for the GIGA. Needed to add function to set the callback function. Also add clear out the callback in the initVariant such that if new program is launched it does not use old address, and instead uses the new address or not at all if the new sketch does not use touch.
89d3fd5
to
7abe8c3
Compare
Currently the config option: CONFIG_INPUT_GT911_MAX_TOUCH_POINTS is not defined for the Giga display shield and defaults to 1. The valid range is 1-5, I have done most of my own testing using 3 with the ArduinoGiga-zephyr I have a PR against the ArduinoCore-zephyr project which allows me to define a callback in the Arduino system: arduino/ArduinoCore-zephyr#134 And a version of the Arduino touch library with some support, the fork/branch https://github.com/KurtE/Arduino_GigaDisplayTouch/tree/zephyr And an example sketch that does touch paint. arduino/ArduinoCore-zephyr#92 (comment) Note: my version of the Arduino touch library has no support for gestures Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Currently the config option: CONFIG_INPUT_GT911_MAX_TOUCH_POINTS is not defined for the Giga display shield and defaults to 1. The valid range is 1-5, I have done most of my own testing using 3 with the ArduinoGiga-zephyr I have a PR against the ArduinoCore-zephyr project which allows me to define a callback in the Arduino system: arduino/ArduinoCore-zephyr#134 And a version of the Arduino touch library with some support, the fork/branch https://github.com/KurtE/Arduino_GigaDisplayTouch/tree/zephyr And an example sketch that does touch paint. arduino/ArduinoCore-zephyr#92 (comment) Note: my version of the Arduino touch library has no support for gestures Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Add a callback function for the touch device
within the fixups for the GIGA. This callback
simply remembers the last touch that happened and
sets a semaphore.
There is also a function added to retrieve this data.
Needed to add the callback function into the exports file.
EDIT: As I mentioned in
#92
This is maybe not a complete setup yet. Currently the zephyr touch device is configured for only one touch
Where it believe is supposed to support up to 5. Also with it only doing one touch, it does not support
gestures. I will integrate our WIP touch code into the Arduino_GIGATouch library such that it is all
available for us or others to fill this in.