raspberrypi-pico: add support for lcd_dev

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
Change-Id: I5cf9fa40cae6ddfe5c8041145f19e5058b76193f
This commit is contained in:
Peter Bee 2021-07-29 13:46:19 +08:00 committed by Alan Carvalho de Assis
parent ae714baae5
commit 84480d760b

View File

@ -34,11 +34,19 @@
#include "rp2040_pico.h"
#ifdef CONFIG_LCD_BACKPACK
# include "rp2040_lcd_backpack.h"
#include "rp2040_lcd_backpack.h"
#endif
#ifdef CONFIG_LCD
#include <nuttx/board.h>
#endif
#ifdef CONFIG_LCD_DEV
#include <nuttx/lcd/lcd_dev.h>
#endif
#ifdef CONFIG_VIDEO_FB
# include <nuttx/video/fb.h>
#include <nuttx/video/fb.h>
#endif
/****************************************************************************
@ -136,6 +144,20 @@ int rp2040_bringup(void)
{
_err("ERROR: Failed to initialize Frame Buffer Driver.\n");
}
#elif defined(CONFIG_LCD)
ret = board_lcd_initialize();
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: Failed to initialize LCD.\n");
}
#endif
#ifdef CONFIG_LCD_DEV
ret = lcddev_register(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: lcddev_register() failed: %d\n", ret);
}
#endif
#ifdef CONFIG_LCD_BACKPACK