martinberlin / cale-idf

CalEPD is an Epaper component driver for the ESP-IDF framework with GFX and font support, optional touch interface, compatible with ESP32 / S2 / S3 / C3

Home Page:https://fasani.de

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement new class using I2S Paralell protocol for Kindle like epapers

martinberlin opened this issue · comments

Based on the great work of Valentin for this parallel displays
https://github.com/vroland/epdiy

It’s my ultimate wish to add support for this fast epapers that do not use SPI peripheral and are driven by I2S data bus using 8 GPIOs plus clock and another extra pin.

Espressif documentation for I2S

First board to be implemented

ED047TC1 | 4.7" | 960 x 540 | 40-pin | 40 | LILYGO 4.7" EPD

Data pins and schema:
DB9CDF85-4DBB-4567-A004-FAB3732EA0F1

Some progress being made
The new idea is to use Epdiy "as is" without refactoring it in C++ since it will be inconsistent and with my code skills a lack of respect to the original author ;)
Anyways it seems to work great just by wrapping it on a C++ class like the others and injecting the original component.
There are some inconsistencies to solve with the original fonts since they conflict with Adafruit GFX but it could be easily solved

../components/Adafruit-GFX/GFXfontDiy.h:15:3: note: previous declaration as 'typedef struct GFXglyph GFXglyph'
 } GFXglyph
 ../components/Adafruit-GFX/GFXfont.h:22:3: note: previous declaration as 'typedef struct GFXfont GFXfont'
 } GFXfont;
  • Needs to be renamed since it's used by Adafruit. Proposed GFXglyphDiy
  • Needs to be renamed since it's used by Adafruit. Proposed GFXfontDiyDiy

e1

Reopening: updateWindow for partial updates is still not implemented.
For that we need to implement a crop function to extract the small buffer from the big GFX framebuffer. Valentin from EPDiy told me he has plans for this, so it's just to wait or try our own version.
For starters this is how the buffer looks like:

parallel_buffer

This is implemented and working already in branch feature/27-i2s-data-bus
Only partial refresh is still not 100% there but as proof-of-concept here is a small video-demo:
https://twitter.com/martinfasani/status/1359393297651884033

So after some more tests will be merged in refactor/oop dev branch and then in a master for a new release

Implemented and working so far. Including T58 touch v1 component