-
Notifications
You must be signed in to change notification settings - Fork 176
lcd: add Epaper 2.7 inch display (BSP-702) #612
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
base: master
Are you sure you want to change the base?
Conversation
Hi, there is one PR (#521) which is solving |
I was aware of #521 <#521> and
incorporated that code into my PR. This is the first PR I've ever submitted
to ANY project, so I didn't know how to use #521 in my own fork other than
to copy that code.
My PR goes much further than #521 because that PR did not provide a working
example with a 2.7 inch rectangular display (or any other rectangular
display).
…On Wed, Jul 23, 2025 at 11:56 PM Vilem Zavodny ***@***.***> wrote:
*espzav* left a comment (espressif/esp-bsp#612)
<#612 (comment)>
Hi, there is one PR (#521 <#521>)
which is solving rows. We haven't got HW for finish the PR. We will check
it and merge it. It seems that your PR solving similar issue.
—
Reply to this email directly, view it on GitHub
<#612 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACHQDVPAK76B724LNUHHIGD3KB7R5AVCNFSM6AAAAACCHDHISOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCMJSGI3TGNZRGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@dr-glenn Thank you for clarification. I will check it, compare and make review. |
I have added the pre-commit hook. Do I have to do another commit and push
now?
…On Thu, Jul 31, 2025 at 4:25 AM Vilem Zavodny ***@***.***> wrote:
*espzav* left a comment (espressif/esp-bsp#612)
<#612 (comment)>
@dr-glenn <https://github.com/dr-glenn> Thank you for clarification. I
will check it, compare and make review.
Please add pre-commit hook (
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/contribute/install-pre-commit-hook.html)
for pass the CI.
—
Reply to this email directly, view it on GitHub
<#612 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACHQDVLJ4C6NTXAGEXO7ZFL3LH4MLAVCNFSM6AAAAACCHDHISOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCMZZGU2TGOJRHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
You can use this command |
|
||
// Select the Waveshare or GooDisplay epaper display that you have. | ||
// The display must use a SSD1680 or 1681 controller (see Waveshare documentation to be sure). | ||
#define WAVE_27 1 // 2.7 inch V2 |
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.
Thisis not right place for selection the screen.
There will be nice to put width/height as runtime settings, when init.
For example add into this structure: esp_lcd_ssd1681_config_t
Same for this
#define SSD1681_LUT_SIZE 159
#if defined(WAVE_154) && WAVE_154==1
#define SSD1681_EPD_1IN54_V2_WIDTH 200
#define SSD1681_EPD_1IN54_V2_HEIGHT 200
#define DISPLAY_W 200
#define DISPLAY_V 200
#define SQUARE_PANEL 1
#elif defined(WAVE_27) && WAVE_27==1
// Waveshare 2.7 inch
#define WAVE_27_V2_WIDTH 176
#define WAVE_27_V2_HEIGHT 264
#define DISPLAY_W 176
#define DISPLAY_V 264
#endif
I tried it on HW (SSD1680 - https://www.adafruit.com/product/4947, epaper_lvgl_demo) and I cannot rotate it ( |
I was able to run the LVGL example on my Waveshare 2.7 inch display, but I
don't recall anything about lv_disp_set_rotation.
I am trying to improve my code as you suggested by putting panel dimensions
into esp_lcd_ssd1681_config_t. Right now I am grappling with a project
config problem with VSCode - for some reason it is not able to find my
local component (which has esp_lcd_panel_ssd1681.c). Needless to say, I was
able to build a week ago. Until I can fix this issue I cannot commit the
code.
…On Mon, Aug 4, 2025 at 5:56 AM Vilem Zavodny ***@***.***> wrote:
*espzav* left a comment (espressif/esp-bsp#612)
<#612 (comment)>
I tried it on HW (SSD1680 - https://www.adafruit.com/product/4947,
epaper_lvgl_demo) and I cannot rotate it (lv_disp_set_rotation(disp,
LV_DISP_ROT_90);). In default, there is error about non-copy mode, when I
change .non_copy_mode to true, still not rotated.
—
Reply to this email directly, view it on GitHub
<#612 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACHQDVMJBXRDCKXTPTIGZ2L3L5J67AVCNFSM6AAAAACCHDHISOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCNJQGU4TAOBQGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @dr-glenn, I am trying |
I've fixed the code as you suggested for epaper_demo, but have not
addressed the trouble with lv_disp_set_rotation, since I do not see that in
epaper_lvgl_demo.
However, I'm totally blocked: pre-commit won't allow me to commit and I
absolutely do not understand what it telling me. I am running Windows 11
Pro, the Python is Anaconda 3.12.7. I also tried running pre-commit from a
bash sh, same troubles.
At the very end:
[WARNING] Stashed changes conflicted with hook auto-fixes... Rolling back
fixes...
[INFO] Restored changes from
C:\Users\glenn\.cache\pre-commit\patch1754503504-31832.
Here is the entire output. Please understand that I've never before heard
of pre-commit or git hooks and I don't even know git very well.
(base) PS C:\Users\glenn\esp\esp-bsp> git commit
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to
C:\Users\glenn\.cache\pre-commit\patch1754503504-31832.
astyle formatter.........................................................
Failed
- hook id: astyle_py
- files were modified by this hook
Formatting components/lcd/esp_lcd_ssd1681/examples/epaper_demo/main/main.c
Formatting components/lcd/esp_lcd_ssd1681/esp_lcd_panel_ssd1681.c
Formatting
components/lcd/esp_lcd_ssd1681/examples/epaper_lvgl_demo/main/main.c
Formatted 3 files
Check copyright notices..................................................
Failed
- hook id: check-copyright
- exit code: 1
- files were modified by this hook
C:\Users\glenn\.cache\pre-commit\repo5b69fn6b\py_env-python3\Lib\site-packages\thefuzz\fuzz.py:11:
UserWarning: Using slow pure-python SequenceMatcher. Install
python-Levenshtein to remove this warning
warnings.warn('Using slow pure-python SequenceMatcher. Install
python-Levenshtein to remove this warning')
Modified files:
components/lcd/esp_lcd_ssd1681/examples/epaper_lvgl_demo/main/main.c
components/lcd/esp_lcd_ssd1681/include/esp_lcd_panel_ssd1681.h
components/lcd/esp_lcd_ssd1681/examples/epaper_demo/main/main.c
components/lcd/esp_lcd_ssd1681/esp_lcd_panel_ssd1681.c
Above is a list of files, which were modified. Please check their contents,
stage them and run the commit again!
Files prefixed with "(ignore)" were on the ignore list at the time of
invoking this script.
They may have been removed if noted above.
Additional information about this hook and copyright headers may be found
here:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/contribute/copyright-guide.html
Processed 4 source files, 4 were modified and 0 have an invalid copyright
(excluding ones on the ignore list).
flake8...............................................(no files to check)
Skipped
Update BSP README with dependencies section..........(no files to check)
Skipped
Update Supported Boards Table........................(no files to check)
Skipped
Update Examples Table................................(no files to check)
Skipped
trim trailing whitespace.................................................
Passed
fix end of files.........................................................
Passed
check for merge conflicts................................................
Passed
mixed line ending........................................................
Failed
- hook id: mixed-line-ending
- exit code: 1
components/lcd/esp_lcd_ssd1681/examples/epaper_demo/main/main.c: fixed
mixed line endings
components/lcd/esp_lcd_ssd1681/esp_lcd_panel_ssd1681.c: fixed mixed line
endings
components/lcd/esp_lcd_ssd1681/examples/epaper_lvgl_demo/main/main.c: fixed
mixed line endings
components/lcd/esp_lcd_ssd1681/include/esp_lcd_panel_ssd1681.h: fixed mixed
line endings
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
doxygen-api-md...........................................................
Passed
[WARNING] Stashed changes conflicted with hook auto-fixes... Rolling back
fixes...
[INFO] Restored changes from
C:\Users\glenn\.cache\pre-commit\patch1754503504-31832.
And this:
PS C:\Users\glenn\esp\esp-bsp> git status
On branch epaper27
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: components/lcd/esp_lcd_ssd1681/esp_lcd_panel_ssd1681.c
modified: components/lcd/esp_lcd_ssd1681/examples/epaper_demo/main/main.c
modified:
components/lcd/esp_lcd_ssd1681/examples/epaper_lvgl_demo/main/main.c
modified: components/lcd/esp_lcd_ssd1681/include/esp_lcd_panel_ssd1681.h
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: components/lcd/esp_lcd_ssd1681/esp_lcd_panel_ssd1681.c
modified: components/lcd/esp_lcd_ssd1681/examples/epaper_demo/main/main.c
modified:
components/lcd/esp_lcd_ssd1681/examples/epaper_lvgl_demo/main/main.c
I don't know what I'm supposed to do with this. How can there be changes
that are both staged and unstaged?
|
than 200x200 pixels). Removed preprocessor constants from component code and put into examples so that display controller can be configured at run time.
Hi @dr-glenn, it seems that I need more time for this PR. I don't undertsand lot of thinks and I need deep study related ePaper drivers. |
Regarding LVGL demo, the clock is specified as 200x200 and it appears
without clipping on my 176x264 display, so that is a puzzle that I don't
understand - it appears it was resized to 176x176. The clock is animated,
but probably not the way an application would use epaper.
I have created an example that displays static text in montserrat_48 font.
A real application might rewrite the screen every few minutes or hours.
Setting sw_rotate=true I am able to rotate displays to 90 and 180, but 270
displays as scrambled bits. Also rotating a 176Wx264H display by 90 results
in an image of 176x176 and the remainder of the display shows random bits.
Due to the way LVGL draws rotated displays, the flush_cb (callback)
function is called multiple times, resulting in the epaper flashing as it
refreshes over and over. I am working on performing the complete rotate in
one single call to flush_cb.
The existing lvgl_demo code is for a square display with both black and
red. When flush_cb writes to a non-existent red layer it changes the
displayed text from solid to outline characters. The code should not write
to red layers if none exist in the display.
This work is ongoing and not checked in yet.
…On Tue, Aug 12, 2025 at 10:55 PM Vilem Zavodny ***@***.***> wrote:
*espzav* left a comment (espressif/esp-bsp#612)
<#612 (comment)>
Hi @dr-glenn <https://github.com/dr-glenn>, it seems that I need more
time for this PR. I don't undertsand lot of thinks and I need deep study
related ePaper drivers.
For example, I don't understand sizes - I tried my ePaper
<https://www.adafruit.com/product/4947> 250x122. The LVGL example was
working, but image was too big and bad rotated. I don't understand, why it
was working, when there is set 250x250. When I changed to my resolution, it
wasn't working.
I would like to make it more verstile, but I am not sure, if it is
possible.
—
Reply to this email directly, view it on GitHub
<#612 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACHQDVOHMQIDIQSQNHKT2VL3NLHLZAVCNFSM6AAAAACCHDHISOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCOBSGI4DMMRRHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Change description
Added code to esp_lcd_ssd1681 for Waveshare 2.7 inch (176x264) epaper display with SSD1680 controller.
The previous code only supported 1.54 inch (200x200) display. The revisions should be readily adaptable for other non-square displays.
Note
Adds SSD1680/1681 e‑paper support for 2.7" 176x264 panels with configurable dimensions, improved mirroring/bitmap handling, and new examples (incl. LVGL rotation).
display_x
/display_y
toesp_lcd_ssd1681_config_t
and driver state; allocate framebuffer and compute sizes using panel dims (not fixed 200x200).SSD1681_PARAM_OUTPUT_CTRL(rows)
parametric; set output control with actual row count.process_bitmap()
to use dynamic dims and correct byte reversal.set_panel_size()
.esp_lcd_ssd1681_commands.h
with parametric output control and clarified data entry mode comments.epaper_lvgl_rotate
example showcasing rotation via canvas/bitmap transform on e‑paper.Written by Cursor Bugbot for commit b4edc7c. This will update automatically on new commits. Configure here.