mirror of
https://github.com/apache/nuttx.git
synced 2025-12-06 09:01:15 +08:00
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>
This commit is contained in:
committed by
Alin Jerpelea
parent
0522e15e1b
commit
bf391cc2bc
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user