Skip to content

Commit bf391cc

Browse files
michallencjerpelea
authored andcommitted
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 <michallenc@seznam.cz>
1 parent 0522e15 commit bf391cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/lcd/st7789.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,8 @@ static void st7789_fill(FAR struct st7789_dev_s *dev, uint16_t color)
717717

718718
for (i = 0; i < ST7789_XRES * ST7789_YRES; i++)
719719
{
720-
SPI_SEND(dev->spi, LCD_ST7789_DATA_PREFIX | (color & 0xff));
721720
SPI_SEND(dev->spi, LCD_ST7789_DATA_PREFIX | (color & 0xff00) >> 8);
721+
SPI_SEND(dev->spi, LCD_ST7789_DATA_PREFIX | (color & 0xff));
722722
}
723723
#else
724724
st7789_select(dev->spi, ST7789_BYTESPP * LCD_ST7789_SPI_BITS);

0 commit comments

Comments
 (0)