diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-28 15:41:37 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-28 15:41:37 -0600 |
commit | f275ca341157a1760f6fc19814570b3604fc918d (patch) | |
tree | f5473e930dc2adce6330798b57b24112582668ee /nuttx/configs/stm3210e-eval | |
parent | 8f19ca38293a6615be3fd6b2ec43f59bc1892010 (diff) | |
download | nuttx-f275ca341157a1760f6fc19814570b3604fc918d.tar.gz nuttx-f275ca341157a1760f6fc19814570b3604fc918d.tar.bz2 nuttx-f275ca341157a1760f6fc19814570b3604fc918d.zip |
STM3210E-EVAL: Add missing initialization for the joystick driver
Diffstat (limited to 'nuttx/configs/stm3210e-eval')
-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; } |