Add audio/ sub-syste, include/nuttx/audio.h interface, and drivers/audio/vs1053.c driver to NuttX. From Ken Pettit
This commit is contained in:
parent
1e03232e9e
commit
39cb8ea999
@ -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"
|
||||
|
||||
@ -177,6 +181,9 @@ int nsh_archinitialize(void)
|
||||
#ifdef CONFIG_STM32_SPI3
|
||||
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;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user