LCD: Added existing FBIO_SETPOWER support to lcd_framebuffer.c
This commit is contained in:
parent
a71f11d480
commit
e2b0d7ef6e
@ -105,6 +105,8 @@ static int lcdfb_setcursor(FAR struct fb_vtable_s *vtable,
|
|||||||
FAR struct fb_setcursor_s *settings);
|
FAR struct fb_setcursor_s *settings);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static int lcdfb_setpower(FAR struct fb_vtable_s *vtable, FAR int power);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -436,6 +438,35 @@ static int lcdfb_setcursor(FAR struct fb_vtable_s *vtable,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: lcdfb_setpower
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
static int lcdfb_setpower(FAR struct fb_vtable_s *vtable, FAR int power)
|
||||||
|
{
|
||||||
|
int ret = -EINVAL;
|
||||||
|
FAR struct lcdfb_dev_s *priv;
|
||||||
|
FAR struct lcd_dev_s *lcd;
|
||||||
|
|
||||||
|
DEBUGASSERT(vtable != NULL);
|
||||||
|
|
||||||
|
priv = (FAR struct lcdfb_dev_s *)vtable;
|
||||||
|
|
||||||
|
if (priv != NULL)
|
||||||
|
{
|
||||||
|
lcd = priv->lcd;
|
||||||
|
DEBUGASSERT(lcd->setpower != NULL);
|
||||||
|
|
||||||
|
ret = lcd->setpower(lcd, power);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
lcderr("ERROR: LCD setpower() failed: %d\n", ret);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -491,6 +522,7 @@ int up_fbinitialize(int display)
|
|||||||
priv->vtable.setcursor = lcdfb_setcursor,
|
priv->vtable.setcursor = lcdfb_setcursor,
|
||||||
#endif
|
#endif
|
||||||
priv->vtable.updatearea = lcdfb_updateearea,
|
priv->vtable.updatearea = lcdfb_updateearea,
|
||||||
|
priv->vtable.setpower = lcdfb_setpower,
|
||||||
|
|
||||||
#ifdef CONFIG_LCD_EXTERNINIT
|
#ifdef CONFIG_LCD_EXTERNINIT
|
||||||
/* Use external graphics driver initialization */
|
/* Use external graphics driver initialization */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user