mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +08:00
drivers/lcd/st7789.c: fix byte order in st7789_fill for 3 wires
Build / Fetch-Source (push) Has been cancelled
Build / Linux-Arch (push) Has been cancelled
Build / Linux (push) Has been cancelled
Build / OOT-Build (push) Has been cancelled
Build / macOS-Arch (push) Has been cancelled
Build / macOS (push) Has been cancelled
Build / msys2-Arch (push) Has been cancelled
Build / msys2 (push) Has been cancelled
Build / msvc-Arch (push) Has been cancelled
Build / msvc (push) Has been cancelled
Build / Fetch-Source (push) Has been cancelled
Build / Linux-Arch (push) Has been cancelled
Build / Linux (push) Has been cancelled
Build / OOT-Build (push) Has been cancelled
Build / macOS-Arch (push) Has been cancelled
Build / macOS (push) Has been cancelled
Build / msys2-Arch (push) Has been cancelled
Build / msys2 (push) Has been cancelled
Build / msvc-Arch (push) Has been cancelled
Build / msvc (push) Has been cancelled
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:
@@ -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