bitluni / ESP32Lib

http://bitluni.net/esp32-vga/
441 stars 78 forks source link

Fix for stability of VGA modes during SPIFFS/WIFI activity #38

Closed Martin-Laclaustra closed 3 years ago

Martin-Laclaustra commented 4 years ago

(Fix incompatibility - from previous commit) Create buffer descriptors for all lines in the frame, with fixed lines for vSync, and a small buffer where hSync is also already fixed. Render active video lines live in the small buffer. Keep the rendered line in sync reading the pointer to the buffer descriptor that points to the DMA buffer just outed by I2S. Fixes #39

Martin-Laclaustra commented 4 years ago

I observe that the example "VGANoFrameBuffer" is not possible any more inheriting from VGA14BitI, because the static functions can not be overriden/virtualized. It should inherit from VGA.h directly or we should create another pointer to another static function in the parent class. However, I think that the benefits of the implementation in this pull request surpass the hurdle of needing to re-think that example.