Skip to content

Commit 0e06e03

Browse files
robertalexa2000xiaoxiang781216
authored andcommitted
esp32-devkitc: add support for LCD char device registration
Signed-off-by: Robert-Ionut Alexa <[email protected]>
1 parent 5bfedbc commit 0e06e03

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@
131131
# include <nuttx/input/buttons.h>
132132
#endif
133133

134+
#ifdef CONFIG_LCD_DEV
135+
# include <nuttx/board.h>
136+
# include <nuttx/lcd/lcd_dev.h>
137+
#endif
138+
134139
#ifdef CONFIG_RTC_DRIVER
135140
# include "esp32_rtc_lowerhalf.h"
136141
#endif
@@ -605,6 +610,20 @@ int esp32_bringup(void)
605610
}
606611
#endif
607612

613+
#ifdef CONFIG_LCD_DEV
614+
ret = board_lcd_initialize();
615+
if (ret < 0)
616+
{
617+
syslog(LOG_ERR, "ERROR: board_lcd_initialize() failed: %d\n", ret);
618+
}
619+
620+
ret = lcddev_register(0);
621+
if (ret < 0)
622+
{
623+
syslog(LOG_ERR, "ERROR: lcddev_register() failed: %d\n", ret);
624+
}
625+
#endif
626+
608627
#ifdef CONFIG_RTC_DRIVER
609628
/* Instantiate the ESP32 RTC driver */
610629

0 commit comments

Comments
 (0)