diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-10-27 08:00:16 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-10-27 08:00:16 -0600 |
commit | 9c16b4db0c040223eedc3f313759b023e28c2e8b (patch) | |
tree | 7c0eb8040309e80a43b8f978ba4af39aa9172a67 /nuttx/include | |
parent | 88a03b68f15d9d477f125e2d9f5754c1c4317641 (diff) | |
download | px4-nuttx-9c16b4db0c040223eedc3f313759b023e28c2e8b.tar.gz px4-nuttx-9c16b4db0c040223eedc3f313759b023e28c2e8b.tar.bz2 px4-nuttx-9c16b4db0c040223eedc3f313759b023e28c2e8b.zip |
Updated VS1053 audio driver from Ken Pettit
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/audio/vs1053.h | 21 |
1 files changed, 12 insertions, 9 deletions
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 <stdint.h> #include <stdbool.h> - + #include <nuttx/irq.h> /**************************************************************************** @@ -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 */ |