honey_the_codewitch
Well-known member
I noticed the existing drivers require an entire framebuffer to be used to support DMA.
I retooled and stripped these drivers so that they can do partial updates to the display, the way libraries like LVGL and htcw_uix expect.
They don't do anything but initialize, rotate, and send bitmaps to the display.
The SSD1351 currently can't be rotated to 1 or 3 without scrambling the output. Not sure why yet, but it works otherwise, and since it's 128x128 i don't consider it a show stopper.
One nice thing is the lcd_spi_driver_t4 makes it easy to implement new displays, complete with DMA support.
Shared Lib Code: https://github.com/codewitch-honey-crisis/lcd_spi_driver_t4
SSD1351 https://github.com/codewitch-honey-crisis/ssd1351_t4
ST7789 https://github.com/codewitch-honey-crisis/st7789_t4
To use, initialize with the pins (I haven't tested software SPI yet, so use a CS pin for your DC line and use the hardware pins for maximum speed and reliability)
Then set your flush complete callback off the class. You'll use this to notify a library like LVGL that the most recent DMA transfer was completed
Then call begin() - the order of this and the above doesn't really matter, you can set callbacks any time
You can call rotation(x) to change the rotation of the display. Works like the T3 drivers, or adafruit drivers
You can then call flush() to send a bitmap to the display. Usually libs like LVGL will call this.
Note that these are NOT general purpose graphics libraries. They are display drivers meant to be used with libraries like LVGL that don't drive hardware directly.
Also, these libraries are structured to be Arduino and PlatformIO ready, but I have not registered them with either of those repos. To use them presently, you'll have to download them manually from the above links.
I retooled and stripped these drivers so that they can do partial updates to the display, the way libraries like LVGL and htcw_uix expect.
They don't do anything but initialize, rotate, and send bitmaps to the display.
The SSD1351 currently can't be rotated to 1 or 3 without scrambling the output. Not sure why yet, but it works otherwise, and since it's 128x128 i don't consider it a show stopper.
One nice thing is the lcd_spi_driver_t4 makes it easy to implement new displays, complete with DMA support.
Shared Lib Code: https://github.com/codewitch-honey-crisis/lcd_spi_driver_t4
SSD1351 https://github.com/codewitch-honey-crisis/ssd1351_t4
ST7789 https://github.com/codewitch-honey-crisis/st7789_t4
To use, initialize with the pins (I haven't tested software SPI yet, so use a CS pin for your DC line and use the hardware pins for maximum speed and reliability)
Then set your flush complete callback off the class. You'll use this to notify a library like LVGL that the most recent DMA transfer was completed
Then call begin() - the order of this and the above doesn't really matter, you can set callbacks any time
You can call rotation(x) to change the rotation of the display. Works like the T3 drivers, or adafruit drivers
You can then call flush() to send a bitmap to the display. Usually libs like LVGL will call this.
Note that these are NOT general purpose graphics libraries. They are display drivers meant to be used with libraries like LVGL that don't drive hardware directly.
Also, these libraries are structured to be Arduino and PlatformIO ready, but I have not registered them with either of those repos. To use them presently, you'll have to download them manually from the above links.