Adafruit VS1053 Arduino Library
Classes | Macros | Typedefs
Adafruit_VS1053.h File Reference
#include <WProgram.h>
#include <pins_arduino.h>
#include "wiring_private.h"
#include <Adafruit_SPIDevice.h>
#include <SD.h>

Go to the source code of this file.

Classes

class  Adafruit_VS1053
 
class  Adafruit_VS1053_FilePlayer
 File player for the Adafruit VS1053. More...
 

Macros

#define VS1053_FILEPLAYER_TIMER0_INT   255
 Allows useInterrupt to accept pins 0 to 254.
 
#define VS1053_FILEPLAYER_PIN_INT   5
 Allows useInterrupt to accept pins 0 to 4.
 
#define VS1053_SCI_READ   0x03
 Serial read address.
 
#define VS1053_SCI_WRITE   0x02
 Serial write address.
 
#define VS1053_REG_MODE   0x00
 Mode control.
 
#define VS1053_REG_STATUS   0x01
 Status of VS1053b.
 
#define VS1053_REG_BASS   0x02
 Built-in bass/treble control.
 
#define VS1053_REG_CLOCKF   0x03
 Clock frequency + multiplier.
 
#define VS1053_REG_DECODETIME   0x04
 Decode time in seconds.
 
#define VS1053_REG_AUDATA   0x05
 Misc. audio data.
 
#define VS1053_REG_WRAM   0x06
 RAM write/read.
 
#define VS1053_REG_WRAMADDR   0x07
 Base address for RAM write/read.
 
#define VS1053_REG_HDAT0   0x08
 Stream header data 0.
 
#define VS1053_REG_HDAT1   0x09
 Stream header data 1.
 
#define VS1053_REG_VOLUME   0x0B
 Volume control.
 
#define VS1053_GPIO_DDR   0xC017
 Direction.
 
#define VS1053_GPIO_IDATA   0xC018
 Values read from pins.
 
#define VS1053_GPIO_ODATA   0xC019
 Values set to the pins.
 
#define VS1053_INT_ENABLE   0xC01A
 Interrupt enable.
 
#define VS1053_MODE_SM_DIFF   0x0001
 Differential, 0: normal in-phase audio, 1: left channel inverted.
 
#define VS1053_MODE_SM_LAYER12   0x0002
 Allow MPEG layers I & II.
 
#define VS1053_MODE_SM_RESET   0x0004
 Soft reset.
 
#define VS1053_MODE_SM_CANCEL   0x0008
 Cancel decoding current file.
 
#define VS1053_MODE_SM_EARSPKLO   0x0010
 EarSpeaker low setting.
 
#define VS1053_MODE_SM_TESTS   0x0020
 Allow SDI tests.
 
#define VS1053_MODE_SM_STREAM   0x0040
 Stream mode.
 
#define VS1053_MODE_SM_SDINEW   0x0800
 VS1002 native SPI modes.
 
#define VS1053_MODE_SM_ADPCM   0x1000
 PCM/ADPCM recording active.
 
#define VS1053_MODE_SM_LINE1   0x4000
 MIC/LINE1 selector, 0: MICP, 1: LINE1.
 
#define VS1053_MODE_SM_CLKRANGE   0x8000
 Input clock range, 0: 12..13 MHz, 1: 24..26 MHz.
 
#define VS1053_SCI_AIADDR   0x0A
 with SCI_WRAMADDR and SCI_WRAM registers. More...
 
#define VS1053_SCI_AICTRL0   0x0C
 SCI_AICTRL register 0. Used to access the user's application program.
 
#define VS1053_SCI_AICTRL1   0x0D
 SCI_AICTRL register 1. Used to access the user's application program.
 
#define VS1053_SCI_AICTRL2   0x0E
 SCI_AICTRL register 2. Used to access the user's application program.
 
#define VS1053_SCI_AICTRL3   0x0F
 SCI_AICTRL register 3. Used to access the user's application program.
 
#define VS1053_SCI_WRAM   0x06
 RAM write/read.
 
#define VS1053_SCI_WRAMADDR   0x07
 Base address for RAM write/read.
 
#define VS1053_PARA_PLAYSPEED   0x1E04
 0,1 = normal speed, 2 = 2x, 3 = 3x etc
 
#define VS1053_DATABUFFERLEN   32
 Length of the data buffer.
 

Typedefs

typedef volatile uint8_t RwReg
 1-byte read-write register
 
typedef uint8_t PortMask
 
typedef volatile RwReg PortReg
 

Macro Definition Documentation

◆ VS1053_SCI_AIADDR

#define VS1053_SCI_AIADDR   0x0A

with SCI_WRAMADDR and SCI_WRAM registers.

Indicates the start address of the application code written earlier

Typedef Documentation

◆ PortMask

typedef uint8_t PortMask

Type definition for a bitmask that is used to specify the bit width

◆ PortReg

typedef volatile RwReg PortReg

Type definition/alias used to specify the port register that a pin is in