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

add RA8875 Touch Support #606

Merged
merged 3 commits into from
Aug 22, 2024
Merged

add RA8875 Touch Support #606

merged 3 commits into from
Aug 22, 2024

Conversation

tobi807
Copy link
Contributor

@tobi807 tobi807 commented Aug 21, 2024

Added two header files to utilize the touch functionality of the RA8875 display driver. Copied from existing touch drivers, did'nt understand the meaning of all functions and variables but works so far.
display.calibrateTouch(...) and subsequent transfomation in display coordinates works nicely with the driver.
Credits to the Adafruit Library https://github.com/adafruit/Adafruit_RA8875

Sample Config

lgfx::Touch_RA8875  _touch_instance;

...

{ // タッチスクリーン制御の設定を行います。(必要なければ削除)
      auto cfg = _touch_instance.config();

      // SPI接続の場合
      cfg.bus_shared = true; // 画面と共通のバスを使用している場合 trueを設定
      cfg.spi_host = VSPI_HOST;// 使用するSPIを選択 (HSPI_HOST or VSPI_HOST)
      cfg.freq = 1000000;     // SPIクロックを設定
      cfg.pin_sclk = 18;
      cfg.pin_mosi = 23;
      cfg.pin_miso = 19;
      cfg.pin_cs   =  5;     //   CSが接続されているピン番号

      _touch_instance.config(cfg);
      _panel_instance.setTouch(&_touch_instance);  // タッチスクリーンをパネルにセットします。
}

@tobozo
Copy link
Collaborator

tobozo commented Aug 21, 2024

thanks, all checks have passed 👍

please add yourself to the contributors list in both cpp and hpp files 😉

you don't need to close this PR, just add a commit to your fork and it'll update this pull request automatically

@tobozo tobozo merged commit 3e449a9 into lovyan03:develop Aug 22, 2024
98 checks passed
@gwiethaus
Copy link

@tobi807 @tobozo Thank you for the new implementation.
I am waiting for the release of the new version.

@gwiethaus
Copy link

gwiethaus commented Sep 14, 2024

Hello my dear @tobi807

I'm Guilherme, I live in Brazil and I apologize for my English and the Google translator may not be able to convey the idea that I would like to convey. :-)

I would like to thank you for the update and implementation of the touch screen for the RA8875 from the LovyanGFX library. 💯

In addition, Mr. @tobozo helped me in the forum to find a way to resolve the initial problems I faced with my display. 👍

I would like to know, out of curiosity, why this new implementation has not yet been uploaded to the official LovyanGFX repository.

Seizing this moment, is this new implementation working correctly? I will use it soon. So if I have any problems I will let you know.

I am very grateful for the effort, as it is helping to achieve my personal projects.

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.

3 participants