diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-05-19 15:12:28 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-05-19 15:12:28 -0600 |
commit | b97a5893e75583cc0d2afeb5c3bcf1f52331a55d (patch) | |
tree | 607094cfdf7856d0e0c01f6b762d5bbf1b2df28e /nuttx/configs/mikroe-stm32f4/src | |
parent | 13cbdd000fffdd62699e6af081f06ff847d5a5cc (diff) | |
download | px4-nuttx-b97a5893e75583cc0d2afeb5c3bcf1f52331a55d.tar.gz px4-nuttx-b97a5893e75583cc0d2afeb5c3bcf1f52331a55d.tar.bz2 px4-nuttx-b97a5893e75583cc0d2afeb5c3bcf1f52331a55d.zip |
Add audio/ sub-syste, include/nuttx/audio.h interface, and drivers/audio/vs1053.c driver to NuttX. From Ken Pettit
Diffstat (limited to 'nuttx/configs/mikroe-stm32f4/src')
-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; } |