-
Notifications
You must be signed in to change notification settings - Fork 137
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
base: master
Are you sure you want to change the base?
Conversation
Still needs testing plus validation
Reflects addition of row override, opening door to ssd1680 support
There was a problem hiding this 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}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#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}) |
(epaper_ssd1681_conf->rows - 1) : (SSD1681_EPD_1IN54_V2_HEIGHT - 1); | ||
if(epaper_panel->_rows != (SSD1681_EPD_1IN54_V2_HEIGHT - 1) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(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) && |
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. |
ESP-BSP Pull Request checklist
Change description
Added row override so that ssd1680 may also be used