diff options
Diffstat (limited to 'nuttx/configs/lm3s6965-ek/src')
-rwxr-xr-x | nuttx/configs/lm3s6965-ek/src/lm3s6965ek_internal.h | 12 | ||||
-rwxr-xr-x | nuttx/configs/lm3s6965-ek/src/up_boot.c | 6 | ||||
-rwxr-xr-x | nuttx/configs/lm3s6965-ek/src/up_oled.c | 18 |
3 files changed, 10 insertions, 26 deletions
diff --git a/nuttx/configs/lm3s6965-ek/src/lm3s6965ek_internal.h b/nuttx/configs/lm3s6965-ek/src/lm3s6965ek_internal.h index 17a791ea4..2b7514c21 100755 --- a/nuttx/configs/lm3s6965-ek/src/lm3s6965ek_internal.h +++ b/nuttx/configs/lm3s6965-ek/src/lm3s6965ek_internal.h @@ -126,18 +126,6 @@ extern void weak_function lm3s_ssiinitialize(void);
-/************************************************************************************
- * Name: lm3s_oledinitialize
- *
- * Description:
- * Called to configure OLED.
- *
- ************************************************************************************/
-
-#ifdef CONFIG_NX_LCDDRIVER
-extern void lm3s_oledinitialize(void);
-#endif
-
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_LM3S6965_EK_SRC_LM3S6965EK_INTERNAL_H */
diff --git a/nuttx/configs/lm3s6965-ek/src/up_boot.c b/nuttx/configs/lm3s6965-ek/src/up_boot.c index d4ab263d5..2a3d59389 100755 --- a/nuttx/configs/lm3s6965-ek/src/up_boot.c +++ b/nuttx/configs/lm3s6965-ek/src/up_boot.c @@ -81,12 +81,6 @@ void lm3s_boardinitialize(void) {
lm3s_ssiinitialize();
}
-
- /* Configure the OLED for use */
-
-#ifdef CONFIG_NX_LCDDRIVER
- lm3s_oledinitialize();
-#endif
#endif
/* Configure on-board LEDs if LED support has been selected. */
diff --git a/nuttx/configs/lm3s6965-ek/src/up_oled.c b/nuttx/configs/lm3s6965-ek/src/up_oled.c index e79b08b34..17b9c2232 100755 --- a/nuttx/configs/lm3s6965-ek/src/up_oled.c +++ b/nuttx/configs/lm3s6965-ek/src/up_oled.c @@ -59,17 +59,17 @@ ****************************************************************************/ /************************************************************************************ - * Name: lm3s_oledinitialize + * Name: up_nxdrvinit * * Description: - * Called to configure OLED. + * Called NX initialization logic to configure the OLED. * ************************************************************************************/ -void lm3s_oledinitialize(void) +FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno) { FAR struct spi_dev_s *spi; - int ret; + FAR struct lcd_dev_s *dev; /* Configure the OLED D/Cn GPIO */ @@ -86,16 +86,18 @@ void lm3s_oledinitialize(void) { /* Bind the SPI port to the OLED */ - ret = rit_initialize(spi, 0); - if (ret < 0) + dev = rit_initialize(spi, devno); + if (!dev) { - glldbg("Failed to bind SPI port 0 to OLED: %d\n", ret); + glldbg("Failed to bind SPI port 0 to OLED %d: %d\n", ret, devno); } else { - gllvdbg("Bound SPI port 0 to OLED\n"); + gllvdbg("Bound SPI port 0 to OLED %d\n", devno); + return dev; } } + return NULL; } /************************************************************************************** |