Skip to content

Commit 2e9b4f3

Browse files
Merge pull request #110 from Serasidis/patch-2
Serasidis_VS1003B_STM - Updated the example for using it with the new one SPI library.
2 parents 17dbe80 + 0b9e84d commit 2e9b4f3

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

STM32F1/libraries/Serasidis_VS1003B_STM/examples/MIDI_Classic_Mode/MIDI_Classic_Mode.ino

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,15 +1414,13 @@ static const unsigned char Bubble_Bobble_MIDI[] = {
14141414
0x1F, 0x00, 0x00, 0x20, 0x64, 0x81, 0x40, 0x20, 0x00, 0x01, 0xFF, 0x2F
14151415
};
14161416

1417-
VS1003 player(PC14, PB10, PA8, PA9); // cs_pin, dcs_pin, dreq_pin, reset_pin, SPI channel - defaults to SPI
1417+
//Un-comment the line with the SPI port you want to use. Default is SPI1 port.
1418+
SPIClass spiVS(1); //Create an SPI instance on SPI1 port.
1419+
//SPIClass spi(2); //Create an SPI instance on SPI2 port.
1420+
//SPIClass spi(3); //Create an SPI instance on SPI3 port.
14181421

1419-
//* Example of how to use the VS21003 attached to SPI 2
1420-
//VS1003 player(PC14, PB10, PA8, PA9,SPIClass(2)); // cs_pin, dcs_pin, dreq_pin, reset_pin, use SPI 2
1422+
VS1003 player(PC14, PB10, PA8, PA9, spiVS); // cs_pin, dcs_pin, dreq_pin, reset_pin, SPI channel - defaults to SPI
14211423

1422-
1423-
/* Example of how to use the VS21003 attached to SPI 2
1424-
VS1003 player(PC14, PB10, PA8, PA9,SPIClass(3)); // cs_pin, dcs_pin, dreq_pin, reset_pin, use SPI 3
1425-
*/
14261424
void setup () {
14271425
SPI.begin(); // initiate SPI
14281426
Serial.begin(9600); // initiate a serial port at 9600

0 commit comments

Comments
 (0)