Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
803ecbf
dcs_lcd_color: Add display_color helpers and fix alpha mask
drlinux Jun 17, 2026
f9683c9
dcs_lcd_draw: Add display-list compositing for transparent backgrounds
drlinux Jun 17, 2026
db55a5c
display_task: Pre-ack update_region and draw_rgb565_raw, fix EPD pixe…
drlinux Jun 17, 2026
1bbee11
Add RGB LCD display driver for ESP-IDF 5+
drlinux Jun 17, 2026
eb279a0
docs: Document RGB LCD driver, update_region, draw_rgb565_raw, and tr…
drlinux Jun 17, 2026
35db839
README: List RGB LCD panels in supported hardware
drlinux Jun 17, 2026
83ba3b2
docs: Name tested Waveshare ESP32-S3 7-inch RGB Touch LCD
drlinux Jun 17, 2026
d08d96b
rgb_lcd: Preserve full framebuffer across region updates and raw draws
drlinux Jun 17, 2026
65f6a51
Fix AtomGL PR review feedback
drlinux Jun 19, 2026
98c9971
fix(display_items): correct uFont pixel order and surface alloc
drlinux Jun 20, 2026
58d4d5a
fix(dcs_lcd_draw): validate scaled_cropped_image parameters
drlinux Jun 20, 2026
d088dbe
fix(rgb_lcd): free driver resources on panel init failure
drlinux Jun 20, 2026
edbb2ad
refactor(rgb_lcd): route buffer draws through draw_buffer with FB sync
drlinux Jun 20, 2026
60365e1
feat(display_items): add rgb565 image tuple format
drlinux Jun 20, 2026
171539a
docs: document draw_buffer and rgb565 image tuples
drlinux Jun 20, 2026
21eea4a
fix(rgb_lcd): device-proven compositor, uFont color, and draw_buffer
drlinux Jun 20, 2026
9818a83
fix(rgb_lcd): use full image width as stride in transparent image draw
drlinux Jun 20, 2026
403ab6f
fix(esp32): gate RGB LCD driver to ESP32-S3 and add port helpers
drlinux Jun 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@

# WHOLE_ARCHIVE option is supported only with esp-idf 5.x
# A link option will be used with esp-idf 4.x
if (IDF_VERSION_MAJOR GREATER_EQUAL 5)
if (IDF_VERSION_MAJOR GREATER_EQUAL 5 AND IDF_TARGET STREQUAL "esp32s3")
set(OPTIONAL_WHOLE_ARCHIVE WHOLE_ARCHIVE)
set(OPTIONAL_ESP_LCD_REQUIRES "esp_lcd")
set(OPTIONAL_RGB_LCD_SRCS "rgb_lcd_display_driver.c")
else()
set(OPTIONAL_WHOLE_ARCHIVE "")
set(OPTIONAL_ESP_LCD_REQUIRES "")
set(OPTIONAL_RGB_LCD_SRCS "")
endif()

idf_component_register(SRCS
Expand All @@ -44,14 +48,15 @@ idf_component_register(SRCS
"memory_display_driver.c"
"oled_commands.c"
"oled_display_driver.c"
${OPTIONAL_RGB_LCD_SRCS}
"spi_dc_driver.c"
"spi_display.c"
"ufontlib.c"
"backlight_gpio.c"
"image_helpers.c"
"spng.c"
"miniz.c"
PRIV_REQUIRES "libatomvm" "avm_sys" "avm_builtins" "driver" "sdmmc" "vfs" "fatfs"
PRIV_REQUIRES "libatomvm" "avm_sys" "avm_builtins" "driver" ${OPTIONAL_ESP_LCD_REQUIRES} "sdmmc" "vfs" "fatfs"
${OPTIONAL_WHOLE_ARCHIVE}
)

Expand Down
2 changes: 2 additions & 0 deletions README.Md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ software dithering
* `sharp,memory-lcd`: Sharp Memory LCDs - 400x240, 1-bit monochrome
* `solomon-systech,ssd1306`: Solomon Systech SSD1306 - 128x64, 1-bit monochrome
* `sino-wealth,sh1106`: Sino Wealth SH1106 - 128x64, 1-bit monochrome
* `esp_lcd,rgb` / `waveshare,esp32-s3-touch-lcd-7`: RGB LCD panels using the ESP32-S3 LCD peripheral,
requires ESP-IDF 5 or later, 16-bit colors (RGB565)

[SDL Linux display](sdl_display/) is also supported and can be built as an AtomVM plugin.

Expand Down
16 changes: 14 additions & 2 deletions dcs_lcd_color.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,29 @@ static inline uint8_t rgba8888_get_alpha(uint32_t color)
static inline uint16_t rgba8888_color_to_rgb565(uint32_t color)
{
uint8_t r = color >> 24;
uint8_t g = (color >> 16) & 0xFF;
uint8_t b = (color >> 8) & 0xFF;
uint8_t g = color >> 16;
uint8_t b = color >> 8;

return (((uint16_t) (r >> 3)) << 11) | (((uint16_t) (g >> 2)) << 5) | ((uint16_t) b >> 3);
}

static inline uint16_t display_color_to_rgb565(uint32_t color)
{
return rgba8888_color_to_rgb565(color);
}

static inline uint16_t rgb565_color_to_surface(uint16_t color16)
{
return (uint16_t) SPI_SWAP_DATA_TX(color16, 16);
}

static inline uint16_t display_color_to_surface(uint32_t color)
{
uint16_t color16 = display_color_to_rgb565(color);

return rgb565_color_to_surface(color16);
}

static inline uint16_t uint32_color_to_surface(uint32_t color)
{
uint16_t color16 = rgba8888_color_to_rgb565(color);
Expand Down
Loading