From 84480d760b1c84d91dd2e0fd7ee752e400f0c364 Mon Sep 17 00:00:00 2001 From: Peter Bee Date: Thu, 29 Jul 2021 13:46:19 +0800 Subject: [PATCH] raspberrypi-pico: add support for lcd_dev Signed-off-by: Peter Bee Change-Id: I5cf9fa40cae6ddfe5c8041145f19e5058b76193f --- .../raspberrypi-pico/src/rp2040_bringup.c | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/boards/arm/rp2040/raspberrypi-pico/src/rp2040_bringup.c b/boards/arm/rp2040/raspberrypi-pico/src/rp2040_bringup.c index 96ee480461..eab72fc130 100644 --- a/boards/arm/rp2040/raspberrypi-pico/src/rp2040_bringup.c +++ b/boards/arm/rp2040/raspberrypi-pico/src/rp2040_bringup.c @@ -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 +#endif + +#ifdef CONFIG_LCD_DEV +#include #endif #ifdef CONFIG_VIDEO_FB -# include +#include #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