diff options
Diffstat (limited to 'nuttx/configs')
-rw-r--r-- | nuttx/configs/mikroe-stm32f4/src/up_nsh.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/nuttx/configs/mikroe-stm32f4/src/up_nsh.c b/nuttx/configs/mikroe-stm32f4/src/up_nsh.c index 9fcf160f9..648f69c64 100644 --- a/nuttx/configs/mikroe-stm32f4/src/up_nsh.c +++ b/nuttx/configs/mikroe-stm32f4/src/up_nsh.c @@ -63,6 +63,10 @@ # include "stm32_usbhost.h" #endif +#ifdef CONFIG_AUDIO +# include "nuttx/audio.h" +#endif + #include "stm32.h" #include "mikroe-stm32f4-internal.h" @@ -178,6 +182,9 @@ int nsh_archinitialize(void) FAR struct spi_dev_s *spi; FAR struct mtd_dev_s *mtd; #endif +#ifdef CONFIG_AUDIO + FAR struct audio_lowerhalf_s *pVs1053; +#endif int ret; /* Configure SPI-based devices */ @@ -344,5 +351,21 @@ int nsh_archinitialize(void) #endif + /* Configure the Audio sub-system if enabled */ + +#ifdef CONFIG_AUDIO + pVs1053 = vs1053_initialize(0); + if (pVs1053 == NULL) + { + message("nsh_archinitialize: Failed to initialize VS1053 Audio module\n"); + } + else + { + /* Bind the vs1053 to the audio upper-half driver */ + + audio_register("mp30", pVs1053); + } + +#endif /* CONFIG_AUDIO */ return OK; } |