diff options
-rw-r--r-- | nuttx/configs/stm3210e-eval/src/stm32_nsh.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nuttx/configs/stm3210e-eval/src/stm32_nsh.c b/nuttx/configs/stm3210e-eval/src/stm32_nsh.c index 4242d1d0f..a16128bec 100644 --- a/nuttx/configs/stm3210e-eval/src/stm32_nsh.c +++ b/nuttx/configs/stm3210e-eval/src/stm32_nsh.c @@ -55,6 +55,7 @@ #endif #include "stm32.h" +#include "stm3210e-eval.h" /**************************************************************************** * Pre-Processor Definitions @@ -123,6 +124,8 @@ int nsh_archinitialize(void) #endif #ifdef NSH_HAVEMMCSD FAR struct sdio_dev_s *sdio; +#endif +#if defined(NSH_HAVEMMCSD) || defined(CONFIG_DJOYSTICK) int ret; #endif @@ -187,6 +190,7 @@ int nsh_archinitialize(void) syslog(LOG_ERR, "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } + syslog(LOG_INFO, "Successfully bound SDIO to the MMC/SD driver\n"); /* Then let's guess and say that there is a card in the slot. I need to check to @@ -196,5 +200,19 @@ int nsh_archinitialize(void) sdio_mediachange(sdio, true); #endif + +#ifdef CONFIG_DJOYSTICK + /* Initialize and register the joystick driver */ + + ret = stm32_djoy_initialization(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to register the joystick driver: %d\n", ret); + return ret; + } + + syslog(LOG_INFO, "Successfully registered the joystick driver\n"); +#endif + return OK; } |