File tree 1 file changed +4
-4
lines changed
examples/Beginner/Audio_Playback
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
2
* GIGA R1 - Audio Playback
3
3
* Simple wav format audio playback via 12-Bit DAC output by reading from a USB drive.
4
- * In order for this sketch to work you need to rename 'USB_DRIVE_NAME ' to the name of your USB stick drive.
4
+ * In order for this sketch to work you need to rename 'USB_DRIVE ' to the name of your USB stick drive.
5
5
*/
6
6
7
7
#include < USBHostMbed5.h>
13
13
AdvancedDAC dac1 (A12);
14
14
15
15
USBHostMSD msd;
16
- mbed::FATFileSystem usb (" USB_DRIVE_NAME " );
16
+ mbed::FATFileSystem usb (" USB_DRIVE " );
17
17
18
18
void setup ()
19
19
{
@@ -29,7 +29,7 @@ void setup()
29
29
delay (1000 );
30
30
31
31
Serial.println (" Mounting USB device ..." );
32
- int const rc_mount = usb.mount (&msd);
32
+ int const rc_mount = usb.mount (&msd);
33
33
if (rc_mount)
34
34
{
35
35
Serial.print (" Error mounting USB device " );
@@ -40,7 +40,7 @@ void setup()
40
40
Serial.println (" Opening audio file ..." );
41
41
42
42
// 16-bit PCM Mono 16kHz realigned noise reduction
43
- FILE * f = fopen (" /USB_DRIVE_NAME /AUDIO_SAMPLE.wav" , " r+" );
43
+ FILE * f = fopen (" /USB_DRIVE /AUDIO_SAMPLE.wav" , " r+" );
44
44
if (f == nullptr )
45
45
{
46
46
Serial.print (" Error opening audio file: " );
You can’t perform that action at this time.
0 commit comments