Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork22
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 ourterms of service andprivacy 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?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Wondering, an alternative implementation for this would be instead of having a handler here, that
|
KurtE commentedJun 6, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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... |
89d3fd5
to7abe8c3
CompareCurrently the config option:CONFIG_INPUT_GT911_MAX_TOUCH_POINTSis not defined for the Giga display shield and defaultsto 1. The valid range is 1-5, I have done most of myown testing using 3 with the ArduinoGiga-zephyrI have a PR against the ArduinoCore-zephyr projectwhich allows me to define a callback in the Arduinosystem:arduino/ArduinoCore-zephyr#134And a version of the Arduino touch library with somesupport, the fork/branchhttps://github.com/KurtE/Arduino_GigaDisplayTouch/tree/zephyrAnd an example sketch that does touch paint.arduino/ArduinoCore-zephyr#92 (comment)Note: my version of the Arduino touch library has no support for gesturesSigned-off-by: Kurt Eckhardt <kurte@rockisland.com>
Currently the config option:CONFIG_INPUT_GT911_MAX_TOUCH_POINTSis not defined for the Giga display shield and defaultsto 1. The valid range is 1-5, I have done most of myown testing using 3 with the ArduinoGiga-zephyrI have a PR against the ArduinoCore-zephyr projectwhich allows me to define a callback in the Arduinosystem:arduino/ArduinoCore-zephyr#134And a version of the Arduino touch library with somesupport, the fork/branchhttps://github.com/KurtE/Arduino_GigaDisplayTouch/tree/zephyrAnd an example sketch that does touch paint.arduino/ArduinoCore-zephyr#92 (comment)Note: my version of the Arduino touch library has no supportfor gesturesSigned-off-by: Kurt Eckhardt <kurte@rockisland.com>
KurtE commentedJun 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@ALL - I cleaned up some of the code in this PR to cleanup which CONFIG_ the code is under for touch. Instead of VIDEO (which is for camera) it uses CONFIG_INPUT_GT911_INTERRUPT Warning these fixes also included fixes that allow the GC2145 camera to work on Portenta H7. Let me know if there is anything you think that should be changed. |
…er in fixups.Added the ability to register a callback function to be called by the zephyr inputsystem.This new code is only there if it is a GIGA and CONFIG_INPUT_GT911_INTERRUPT is defined.This includes adding a callback function that is linked in to the zephyr build, and exporta function to call to allow us to register our own.Added an init variant to GIGA that if the touch interrupt is enabled, then it will clear out the old user definedcallback if any.This version also added in the changes to fixups that allow a camera to work on Portenta H7.Needed to have it do the same as GIGA to start the PWM if INPUT is configured in.And updated the portentas remote_endpoint define to be using the same format as used in the giga overlayAlso changed to STM32_DMA_FIFO_1-4, like the GIGA currently hasUpdate arduino_portenta_h7_stm32h747xx_m7.overlay
Currently the config option:CONFIG_INPUT_GT911_MAX_TOUCH_POINTSis not defined for the Giga display shield and defaultsto 1. The valid range is 1-5, I have done most of myown testing using 3 with the ArduinoGiga-zephyrI have a PR against the ArduinoCore-zephyr projectwhich allows me to define a callback in the Arduinosystem:arduino/ArduinoCore-zephyr#134And a version of the Arduino touch library with somesupport, the fork/branchhttps://github.com/KurtE/Arduino_GigaDisplayTouch/tree/zephyrAnd an example sketch that does touch paint.arduino/ArduinoCore-zephyr#92 (comment)Note: my version of the Arduino touch library has no supportfor gesturesSigned-off-by: Kurt Eckhardt <kurte@rockisland.com>
Uh oh!
There was an error while loading.Please reload this page.
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.