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

ssd1680 support (BSP-643) #521

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

malachib
Copy link

ESP-BSP Pull Request checklist

  • Version of modified component bumped
  • CI passing

Change description

Added row override so that ssd1680 may also be used

Still needs testing plus validation
Reflects addition of row override, opening door to ssd1680 support
@CLAassistant
Copy link

CLAassistant commented Feb 26, 2025

CLA assistant check
All committers have signed the CLA.

@malachib malachib changed the title Feat/ssd1680 2 ssd1680 support Feb 26, 2025
@github-actions github-actions bot changed the title ssd1680 support ssd1680 support (BSP-643) Feb 26, 2025
Copy link
Collaborator

@tore-espressif tore-espressif left a comment

Choose a reason for hiding this comment

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

@malachib thank you for the PR!

Would it be better if we stored real number of rows in epaper_panel->_rows?

@@ -14,7 +14,8 @@
#define SSD1681_CMD_SWRST 0x12
// --- Driver output control
#define SSD1681_CMD_OUTPUT_CTRL 0x01
#define SSD1681_PARAM_OUTPUT_CTRL ((uint8_t[]) {0xc7, 0x00, 0x00})
// Chipset wants (total row count - 1) i.e. 250 rows = 249 here
#define SSD1681_PARAM_OUTPUT_CTRL(rows) ((uint8_t[]) {(rows) & 0xFF, (rows) >> 8, 0x00})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#define SSD1681_PARAM_OUTPUT_CTRL(rows) ((uint8_t[]) {(rows) & 0xFF, (rows) >> 8, 0x00})
#define SSD1681_PARAM_OUTPUT_CTRL(rows) ((uint8_t[]) {(rows - 1) & 0xFF, (rows - 1) >> 8, 0x00})

Comment on lines +275 to +276
(epaper_ssd1681_conf->rows - 1) : (SSD1681_EPD_1IN54_V2_HEIGHT - 1);
if(epaper_panel->_rows != (SSD1681_EPD_1IN54_V2_HEIGHT - 1) &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
(epaper_ssd1681_conf->rows - 1) : (SSD1681_EPD_1IN54_V2_HEIGHT - 1);
if(epaper_panel->_rows != (SSD1681_EPD_1IN54_V2_HEIGHT - 1) &&
(epaper_ssd1681_conf->rows) : (SSD1681_EPD_1IN54_V2_HEIGHT);
if(epaper_panel->_rows != (SSD1681_EPD_1IN54_V2_HEIGHT) &&

@malachib
Copy link
Author

malachib commented Mar 4, 2025

Thank you too for providing the ssd1681 in the first place!

I am open to your suggestion. I treated rows as precalculated as an optimization. Subtracts are about as fast as it gets though... Certainly the code is clearer the way you suggest.

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