This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch releases/12.12
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/releases/12.12 by this push:
new 30300491bc1 drivers/lcd/st7789.c: fix byte order in st7789_fill for 3
wires
30300491bc1 is described below
commit 30300491bc147d9cbd442283a62f14d911dc7871
Author: Michal Lenc <[email protected]>
AuthorDate: Wed Dec 3 10:26:14 2025 +0100
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 <[email protected]>
---
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);