VS1053
1.03.00
Arduino Library for VS10xx shield
|
#include <pins_arduino.h>
Go to the source code of this file.
Macros | |
#define | SEEEDUINO 0 |
A macro to configure use on a Seeeduino MP3 player shield. More... | |
#define | GRAVITECH 0 |
A macro to configure use on a Gravitech's MP3-4NANO shield. More... | |
#define | TEENSY2 0 |
Macro to configure pins for connecting the Sparkfun shield to a Teensy 2. More... | |
#define | BARETOUCH 0 |
A macro to explicitly configure use with the Bare Conductive Touch Board. More... | |
#define | PERF_MON_PIN -1 |
A macro to configure a Pin to analyze performance. More... | |
#define | MP3_XCS 6 |
A macro to configure the XCS pin. More... | |
#define | MP3_XDCS 7 |
A macro to configure the XDCS pin. More... | |
#define | MP3_DREQ 2 |
A macro to configure the DREQ pin. More... | |
#define | MP3_DREQINT 0 |
A macro to configure the DREQINT pin. More... | |
#define | MP3_RESET 8 |
A macro to configure the RESET pin. More... | |
#define | SD_SEL 9 |
A macro to configure the SdCard Chip Select for vs1053 library. More... | |
#define | USE_MP3_REFILL_MEANS USE_MP3_INTx |
The selection of DREQ'ss refilling method. More... | |
#define | USE_MP3_INTx 0 |
defacto Interrupt on INTx, from DREQ More... | |
#define | USE_MP3_Polled 1 |
A macro of the enumerated value used to select Software polling as the means to refill the VS10xx. More... | |
#define | USE_MP3_Timer1 2 |
A macro of the enumerated value used to select Timer1's interrupt as the means to refill the VS10xx. More... | |
#define | USE_MP3_SimpleTimer 3 |
A macro of the enumerated value used to select Soft SimpleTimer period as the means to refill the VS10xx. More... | |
#define | MIDI_CHANNEL 9 |
A macro used to specify the MIDI channel. More... | |
#define | MIDI_NOTE_NUMBER 56 |
A macro used to specify the MIDI note. More... | |
#define | MIDI_NOTE_DURATION 100 |
A macro used to specify the duration of the MIDI note. More... | |
#define | MIDI_INTENSITY 127 |
A macro used to specify the intensity of the MIDI note. More... | |
#define BARETOUCH 0 |
A macro to explicitly configure use with the Bare Conductive Touch Board.
Bare Conductive's Touch Board is supported. However, its pin mapping is significantly different to the SparkFun MP3 player shield.
If you are using Arduino 1.5.0+ then automatic pin remapping can be enabled as follows:
This will automatically set up this library when the board is selected, and revert back to the setting for the Sparkfun MP3 shield when it is not. If you would like to override this, set the BARETOUCH value below: 0 to use the Sparkfun MP3 shield, 1 to use the Bare Conductive Touch Board.
If you are using an earlier version of Arduino, you will have to manage the pin remapping manually. Setting BARETOUCH below to 0 will leave the pin map as normal - i.e. for the Sparkfun MP3 shield. Setting it to 1 will map the pins correctly for the Bare Conductive Touch Board. If you decide to then use a different board, you'll have to remember to come back here and adjust the settings accordingly.
Definition at line 134 of file vs1053_SdFat_config.h.
#define GRAVITECH 0 |
A macro to configure use on a Gravitech's MP3-4NANO shield.
Gravitech's MP3-4NANO shield is supported. However, its chip select of the SdCard connected to D4. This can be configured, simply by setting the below define of GRAVITECH to 1.
Set GRAVITECH
to 0
to use on a Gravitech's MP3-4NANO shield
Set GRAVITECH
to 1
to use on a Gravitech's MP3-4NANO
Definition at line 87 of file vs1053_SdFat_config.h.
#define MIDI_CHANNEL 9 |
A macro used to specify the MIDI channel.
Where used in the SingleMIDInoteFile array for sending quick beeps with function vs1053::SendSingleMIDInote()
Definition at line 382 of file vs1053_SdFat_config.h.
#define MIDI_INTENSITY 127 |
A macro used to specify the intensity of the MIDI note.
Value ranges from 0 to 127(full scale). Where used in the SingleMIDInoteFile array for sending both the ON and off of the quick beep with function vs1053::SendSingleMIDInote()
Definition at line 411 of file vs1053_SdFat_config.h.
#define MIDI_NOTE_DURATION 100 |
A macro used to specify the duration of the MIDI note.
Where used in the SingleMIDInoteFile array for sending quick beeps with function vs1053::SendSingleMIDInote()
Definition at line 402 of file vs1053_SdFat_config.h.
#define MIDI_NOTE_NUMBER 56 |
A macro used to specify the MIDI note.
Where used in the SingleMIDInoteFile array for sending quick beeps with function vs1053::SendSingleMIDInote()
Definition at line 392 of file vs1053_SdFat_config.h.
#define MP3_DREQ 2 |
A macro to configure the DREQ pin.
VS10xx's DREQ pin that indicates when it is clear to send more data. aka Data REQuest. as seen by the the Arduino
Definition at line 247 of file vs1053_SdFat_config.h.
#define MP3_DREQINT 0 |
A macro to configure the DREQINT pin.
The associated INT(X) pin name for the associated pin of DREQ, if used. as seen by the the Arduino
This may not be needed when USE_MP3_REFILL_MEANS is not equal to USE_MP3_REFILL_MEANS
Definition at line 251 of file vs1053_SdFat_config.h.
#define MP3_RESET 8 |
A macro to configure the RESET pin.
VS10xx's RESET Pin as seen by the the Arduino
Definition at line 253 of file vs1053_SdFat_config.h.
#define MP3_XCS 6 |
A macro to configure the XCS pin.
VS10xx's Control Chip Select Pin (for accessing SPI Control/Status registers) as seen by the the Arduino
Definition at line 245 of file vs1053_SdFat_config.h.
#define MP3_XDCS 7 |
A macro to configure the XDCS pin.
VS10xx's Data Chip Select Pin (for streaming data back and forth) as seen by the the Arduino
Definition at line 246 of file vs1053_SdFat_config.h.
#define PERF_MON_PIN -1 |
A macro to configure a Pin to analyze performance.
The output of this pin will be low, during the refill of the VSdsp, allowing measurement of the CPU utilization, required to sustain playing.
Set value to any available digital output, including A0-5...
Set value to negative to disable.
Definition at line 206 of file vs1053_SdFat_config.h.
#define SD_SEL 9 |
A macro to configure the SdCard Chip Select for vs1053 library.
This is the pin of the Arduino that is connected to the SdCards Chip select pin. This pin should be the same pin assigned in SdFat Library. as seen by the the Arduino
Definition at line 257 of file vs1053_SdFat_config.h.
#define SEEEDUINO 0 |
A macro to configure use on a Seeeduino MP3 player shield.
Seeduino MP3 Players is supported. However, its DREQ is not connected to a hard INT(x) pin, hence it MUST be polled. This can be configured, using USE_MP3_SimpleTimer. When using a Seeeduino MP3 Player shield set the below define of SEEEDUINO to 1. As so the correct IO pins are configured MP3_XCS, MP3_XDCS and MP3_DREQ
Along with USE_MP3_REFILL_MEANS should not be USE_MP3_INTx, unless extra jumper wires are used.
Set SEEEDUINO
to 0
to use on a SparkFun MP3 player shield
Set SEEEDUINO
to 1
to use on a Seeeduino MP3 player shield
Definition at line 73 of file vs1053_SdFat_config.h.
#define TEENSY2 0 |
Macro to configure pins for connecting the Sparkfun shield to a Teensy 2.
You can connect the Sparkfun Mp3 shield to a Teensy 2 with jumper cables on a breadboard. Teensy SDI pins are CS=0, SCK=1, MOSI=2, MISO=3. If you are using a Teensy 2 then set TEENSY2 to 1 below and scroll down for pin assignments.
Set TEENSY2
to 0
to use on a Gravitech's MP3-4NANO shield
Set TEENSY2
to 1
to use on a Gravitech's MP3-4NANO
Definition at line 101 of file vs1053_SdFat_config.h.
#define USE_MP3_INTx 0 |
defacto Interrupt on INTx, from DREQ
A macro of the enumerated value used to select hard interrupt INTx as the means to refill the VS10xx
Where the Interrupt Service Routine attached to INTx as per attachInterrupt(MP3_DREQINT, refill, RISING) causes execution of vs1053::refill() as per the VS10xx need per DREQ.
Definition at line 306 of file vs1053_SdFat_config.h.
#define USE_MP3_Polled 1 |
A macro of the enumerated value used to select Software polling as the means to refill the VS10xx.
Where Main loop uses vs1053::available() to check if DREQ needs refilling on a periodic basis.
Definition at line 316 of file vs1053_SdFat_config.h.
#define USE_MP3_REFILL_MEANS USE_MP3_INTx |
The selection of DREQ'ss refilling method.
The value is that of an enumerated list of possible methods, aka means.
The VS10xx's DREQ requests more data from the host micro (the Arduino) Where it can either be an input to an interrupt and corresponding ISR or be polled by software.
To enable MP3 Player to use OTHER than default INT0 on D2 for refilling uncomment or change the define of USE_MP3_REFILL_MEANS and set to desired method,
The default when left commented implements INT0 on D2.
Definition at line 284 of file vs1053_SdFat_config.h.
#define USE_MP3_SimpleTimer 3 |
A macro of the enumerated value used to select Soft SimpleTimer period as the means to refill the VS10xx.
Where Main loop uses vs1053::available() to check if DREQ needs refilling on a periodic basis.
Definition at line 344 of file vs1053_SdFat_config.h.
#define USE_MP3_Timer1 2 |
A macro of the enumerated value used to select Timer1's interrupt as the means to refill the VS10xx.
Where the Interrupt Service Route attached to Timer1 cause periodic execution of vs1053::refill()
Definition at line 328 of file vs1053_SdFat_config.h.