You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/08/04 01:31:01 UTC
[GitHub] [incubator-nuttx] lupyuen commented on pull request #6657: drivers/lcd/st7789: update putarea() method
lupyuen commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1204657460
Hi @tmedicci this patch for `lvgldemo/lcddev.c` works OK for my ST7789:
https://github.com/lupyuen/lvgltest-nuttx/commit/95c76d4c8dd204a111abf87d81fd74f9fdef6dd8
```c
static void lcddev_sync_flush(lv_disp_drv_t *disp_drv, const lv_area_t *area,
lv_color_t *color_p)
{
// TODO: Change LCDDEVIO_PUTRUN back to LCDDEVIO_PUTAREA so that it performs better with SPI DMA
// https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1200094716
lv_color_t *data = color_p;
for (lv_coord_t row = area->y1; row <= area->y2; row++)
{
int ret;
struct lcddev_run_s lcd_run;
lcd_run.row = row;
lcd_run.col = area->x1;
lcd_run.data = (uint8_t *)data;
lcd_run.npixels = area->x2 - area->x1 + 1;
data += lcd_run.npixels;
ret = ioctl(state.fd, LCDDEVIO_PUTRUN,
(unsigned long)((uintptr_t)&lcd_run));
if (ret < 0)
{
int errcode = errno;
gerr("ioctl(LCDDEVIO_PUTRUN) failed: %d\n", errcode);
close(state.fd);
return;
}
}
/* Tell the flushing is ready */
lv_disp_flush_ready(disp_drv);
}
```
This patch renders one row of pixels at a time. So it might not render as quickly as the previous version. (Especially with SPI DMA)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org