Skip to content
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

adding touch hander class as new DRV_TOUCH to enable user specific touch #64

Merged
merged 2 commits into from
Oct 22, 2018

Conversation

espHorst
Copy link
Contributor

As discussed here a PR adding a new touch handler class.
The touch handler class is included as an own driver into GUIslice which can be selected as the other drivers via defines.
The user can now add a own touch driver just by performing the steps below.
Thus no modification / adoption of the GUIslice library itself is required to test / add a new touch driver.

To create a new user specific touch handler

  • copy the full functional example GUIslice_th_XPT2046.h to the user application directory
  • rename it
  • adopt it to the specific touch display

In the user program (I have added an example arduino gslc_ex11_ard_touch_handler) just

  • include your adopted touch handler
  • instantiate your touch handler
  • call gslc_InitTouchHandler(&touchHandler);

I have successfully tested the touch handler with a STM32F1 and a 2.4" TFT SPI 240x320.
Please have I look at the text headers of the files, I did not know what has to be added.

@ImpulseAdventure
Copy link
Owner

Looks good.

I tested this in the regression and it appears OK with Arduino_STM32, Adafruit-GFX-AS and the Generic STM32F103C8 target.

Note that I may rename gslc_ex11_ard_touch_handler later to gslc_ex11_ard for consistency.

Thanks!

@ImpulseAdventure
Copy link
Owner

ImpulseAdventure commented Oct 22, 2018

(Duplicate comment due to GutHub issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants