Adjusting the APA102 driver to refer the buffer from the begining.

This commit is contained in:
Tiago Medicci Serrano 2022-08-08 10:47:23 -03:00 committed by Xiang Xiao
parent df0604a4be
commit 2234c005d1

View File

@ -505,12 +505,14 @@ static int apa102_putarea(FAR struct lcd_dev_s *dev,
if (i % 2 == 0)
{
priv->fb[(i * APA102_XRES) + j] =
rgb565_apa102(*(src + (i * APA102_XRES) + j));
rgb565_apa102(*(src + ((i - row_start) * APA102_XRES) +
(j - col_start)));
}
else
{
priv->fb[(i * APA102_XRES) + APA102_XRES - j - 1] =
rgb565_apa102(*(src + (i * APA102_XRES) + j));
rgb565_apa102(*(src + ((i - row_start) * APA102_XRES) +
(j - col_start)));
}
}
}