From f3dbc7bc63073f6b2f45296063c9759e279a5b16 Mon Sep 17 00:00:00 2001 From: Yuichi Nakamura Date: Sun, 26 Jun 2022 22:21:57 +0900 Subject: [PATCH] drivers/lcd: getplaneinfo fix for ST7789,ST7565 and skeleton driver --- drivers/lcd/skeleton.c | 1 + drivers/lcd/st7565.c | 1 + drivers/lcd/st7789.c | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/lcd/skeleton.c b/drivers/lcd/skeleton.c index c596e229a6..44caecd61b 100644 --- a/drivers/lcd/skeleton.c +++ b/drivers/lcd/skeleton.c @@ -301,6 +301,7 @@ static int skel_getplaneinfo(FAR struct lcd_dev_s *dev, DEBUGASSERT(dev && pinfo && planeno == 0); ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); + pinfo->dev = dev; return OK; } diff --git a/drivers/lcd/st7565.c b/drivers/lcd/st7565.c index 879c86968f..32225786ad 100644 --- a/drivers/lcd/st7565.c +++ b/drivers/lcd/st7565.c @@ -723,6 +723,7 @@ static int st7565_getplaneinfo(FAR struct lcd_dev_s *dev, DEBUGASSERT(dev && pinfo && planeno == 0); ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); + pinfo->dev = dev; return OK; } diff --git a/drivers/lcd/st7789.c b/drivers/lcd/st7789.c index 96d93c5a0c..0da971260f 100644 --- a/drivers/lcd/st7789.c +++ b/drivers/lcd/st7789.c @@ -646,6 +646,7 @@ static int st7789_getplaneinfo(FAR struct lcd_dev_s *dev, #endif pinfo->buffer = (FAR uint8_t *)priv->runbuffer; /* Run scratch buffer */ pinfo->bpp = priv->bpp; /* Bits-per-pixel */ + pinfo->dev = dev; /* The lcd device */ return OK; }