From 9c16b4db0c040223eedc3f313759b023e28c2e8b Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 27 Oct 2013 08:00:16 -0600 Subject: Updated VS1053 audio driver from Ken Pettit --- nuttx/include/nuttx/audio/vs1053.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'nuttx/include') diff --git a/nuttx/include/nuttx/audio/vs1053.h b/nuttx/include/nuttx/audio/vs1053.h index 1d99e44f6..cfc660f00 100644 --- a/nuttx/include/nuttx/audio/vs1053.h +++ b/nuttx/include/nuttx/audio/vs1053.h @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __INCLUDE_NUTTX_NET_VS1053_H -#define __INCLUDE_NUTTX_NET_VS1053_H +#ifndef __INCLUDE_NUTTX_AUDIO_VS1053_H +#define __INCLUDE_NUTTX_AUDIO_VS1053_H /**************************************************************************** * Included Files @@ -42,7 +42,7 @@ #include #include - + #include /**************************************************************************** @@ -59,8 +59,8 @@ * Public Types ****************************************************************************/ -/* The VS1053 provides Data Request (DREQ) interrupts to the MCU via a GPIO - * pin and also has a chip reset GPIO. The following structure provides an +/* The VS1053 provides Data Request (DREQ) interrupts to the MCU via a GPIO + * pin and also has a chip reset GPIO. The following structure provides an * MCU-independent mechanism for controlling the VS1053 GPIOs. */ @@ -70,6 +70,8 @@ struct vs1053_lower_s void (*enable)(FAR const struct vs1053_lower_s *lower); void (*disable)(FAR const struct vs1053_lower_s *lower); void (*reset)(FAR const struct vs1053_lower_s *lower, bool state); + int (*read_dreq)(FAR const struct vs1053_lower_s *lower); + int irq; }; /**************************************************************************** @@ -78,7 +80,8 @@ struct vs1053_lower_s #ifdef __cplusplus #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -91,7 +94,7 @@ extern "C" { * Function: vs1053_initialize * * Description: - * Initialize the VS1053 driver. This will perform a chip reset of the + * Initialize the VS1053 driver. This will perform a chip reset of the * device as part of initialization. * * Parameters: @@ -110,7 +113,7 @@ extern "C" { struct spi_dev_s; /* see nuttx/spi/spi.h */ struct audio_lowerhalf_s; /* see nutt/audio.h */ -EXTERN FAR struct audio_lowerhalf_s *vs1053_initialize(FAR struct spi_dev_s *spi, +FAR struct audio_lowerhalf_s *vs1053_initialize(FAR struct spi_dev_s *spi, FAR const struct vs1053_lower_s *lower, unsigned int devno); @@ -119,4 +122,4 @@ EXTERN FAR struct audio_lowerhalf_s *vs1053_initialize(FAR struct spi_dev_s *spi } #endif -#endif /* __INCLUDE_NUTTX_NET_VS1053_H */ +#endif /* __INCLUDE_NUTTX_AUDIO_VS1053_H */ -- cgit v1.2.3