drivers/lcd: getplaneinfo fix for ST7789,ST7565 and skeleton driver

This commit is contained in:
Yuichi Nakamura 2022-06-26 22:21:57 +09:00 committed by Petro Karashchenko
parent c6c0baa233
commit f3dbc7bc63
3 changed files with 3 additions and 0 deletions

View File

@ -301,6 +301,7 @@ static int skel_getplaneinfo(FAR struct lcd_dev_s *dev,
DEBUGASSERT(dev && pinfo && planeno == 0); DEBUGASSERT(dev && pinfo && planeno == 0);
ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
pinfo->dev = dev;
return OK; return OK;
} }

View File

@ -723,6 +723,7 @@ static int st7565_getplaneinfo(FAR struct lcd_dev_s *dev,
DEBUGASSERT(dev && pinfo && planeno == 0); DEBUGASSERT(dev && pinfo && planeno == 0);
ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
pinfo->dev = dev;
return OK; return OK;
} }

View File

@ -646,6 +646,7 @@ static int st7789_getplaneinfo(FAR struct lcd_dev_s *dev,
#endif #endif
pinfo->buffer = (FAR uint8_t *)priv->runbuffer; /* Run scratch buffer */ pinfo->buffer = (FAR uint8_t *)priv->runbuffer; /* Run scratch buffer */
pinfo->bpp = priv->bpp; /* Bits-per-pixel */ pinfo->bpp = priv->bpp; /* Bits-per-pixel */
pinfo->dev = dev; /* The lcd device */
return OK; return OK;
} }