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 support for Pico-ResTouch-LCD-3.5 to ili9xxx driver #6129

Merged
merged 6 commits into from
Jan 23, 2024

Conversation

clydebarrow
Copy link
Contributor

What does this implement/fix?

Support the Waveshare Pico-ResTouch-LCD-3.5. This is an ILI9488 with a custom SPI-parallel interface.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes esphome/issues#5324

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#3563

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

# Example config.yaml
display:
  - platform: ili9xxx
    id: wave_disp
    model: WAVESHARE_RES_3_5
    transform:
      mirror_y: true
      swap_xy: true
    cs_pin: GPIO5
    dc_pin: GPIO22
    reset_pin: GPIO21
    spi_mode: mode0
    data_rate: 20MHz

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@probot-esphome
Copy link

Hey there @nielsnl68, mind taking a look at this pull request as it has been labeled with an integration (ili9xxx) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@codecov-commenter
Copy link

codecov-commenter commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c35a217) 53.69% compared to head (58a67f1) 53.69%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #6129   +/-   ##
=======================================
  Coverage   53.69%   53.69%           
=======================================
  Files          50       50           
  Lines        9398     9398           
  Branches     1652     1652           
=======================================
  Hits         5046     5046           
  Misses       4053     4053           
  Partials      299      299           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@nielsnl68 nielsnl68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for digging into this issue and found the solution.

I was a little shocked about the extra bit in the sending method's last night when you committed this PR, But your explanation on the issue tread did made a lot of sense.

esphome/components/ili9xxx/ili9xxx_display.h Show resolved Hide resolved
@esphome esphome bot marked this pull request as draft January 22, 2024 12:04
@esphome
Copy link

esphome bot commented Jan 22, 2024

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@nielsnl68
Copy link
Contributor

@clydebarrow, You made the data() method 16 bit as explained here. Should the command() method not also be 16 bits as well?

@clydebarrow
Copy link
Contributor Author

@clydebarrow, You made the data() method 16 bit as explained here. Should the command() method not also be 16 bits as well?

No.Waveshare does not publish a schematic or describe the logic of the interface, but the sample code does exactly what I have implemented, and it works.

@clydebarrow clydebarrow marked this pull request as ready for review January 22, 2024 21:02
@esphome esphome bot requested a review from nielsnl68 January 22, 2024 21:02
@kbx81
Copy link
Member

kbx81 commented Jan 23, 2024

@nielsnl68 I'm good with this -- are you? 😇

Copy link
Contributor

@nielsnl68 nielsnl68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as it works then it is okay.

@clydebarrow clydebarrow merged commit 23071e9 into esphome:dev Jan 23, 2024
55 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2024
@clydebarrow clydebarrow deleted the i9488 branch April 24, 2024 00:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ILI9XXX component no longer works with Waveshare Pico-ResTouch-LCD-3.5 or Waveshare 3.5inch RPi LCD (C) boards
4 participants