From bf391cc2bc464bbe574b94a29da4a08af2d50f4b Mon Sep 17 00:00:00 2001 From: Michal Lenc Date: Wed, 3 Dec 2025 10:26:14 +0100 Subject: [PATCH] drivers/lcd/st7789.c: fix byte order in st7789_fill for 3 wires The bytes of color should be sent in an opposite order in st7789_fill function if the driver operates in 3 wire mode. Signed-off-by: Michal Lenc --- drivers/lcd/st7789.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lcd/st7789.c b/drivers/lcd/st7789.c index 82037adbde6..ff357a8df26 100644 --- a/drivers/lcd/st7789.c +++ b/drivers/lcd/st7789.c @@ -717,8 +717,8 @@ static void st7789_fill(FAR struct st7789_dev_s *dev, uint16_t color) for (i = 0; i < ST7789_XRES * ST7789_YRES; i++) { - SPI_SEND(dev->spi, LCD_ST7789_DATA_PREFIX | (color & 0xff)); SPI_SEND(dev->spi, LCD_ST7789_DATA_PREFIX | (color & 0xff00) >> 8); + SPI_SEND(dev->spi, LCD_ST7789_DATA_PREFIX | (color & 0xff)); } #else st7789_select(dev->spi, ST7789_BYTESPP * LCD_ST7789_SPI_BITS);