diff --git a/drivers/lcd/apa102.c b/drivers/lcd/apa102.c index 981ec954ac..5a612872a1 100644 --- a/drivers/lcd/apa102.c +++ b/drivers/lcd/apa102.c @@ -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))); } } }