Skip to content

Commit d1e1540

Browse files
committed
chore: Fix builtin LED defs
1 parent c0fd2a7 commit d1e1540

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

examples/AltPinSerial/AltPinSerial.ino

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
MIDI_NAMESPACE::MidiInterface<Transport> MIDI((Transport&)serialMIDI);
1919
#endif
2020

21+
// Some boards don't have this set (ESP32)
22+
#ifndef LED_BUILTIN
23+
#define LED_BUILTIN 0
24+
#endif
25+
2126
void setup()
2227
{
2328
pinMode(LED_BUILTIN, OUTPUT);

examples/CustomBaudRate/CustomBaudRate.ino

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ struct CustomBaudRateSettings : public MIDI_NAMESPACE::DefaultSerialSettings {
1515
MIDI_NAMESPACE::MidiInterface<MIDI_NAMESPACE::SerialMIDI<HardwareSerial, CustomBaudRateSettings>> MIDI((MIDI_NAMESPACE::SerialMIDI<HardwareSerial, CustomBaudRateSettings>&)serialMIDI);
1616
#endif
1717

18+
// Some boards don't have this set (ESP32)
19+
#ifndef LED_BUILTIN
20+
#define LED_BUILTIN 0
21+
#endif
22+
1823
void setup() {
1924
pinMode(LED_BUILTIN, OUTPUT);
2025
MIDI.begin(MIDI_CHANNEL_OMNI);

examples/ErrorCallback/ErrorCallback.ino

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55

66
MIDI_CREATE_DEFAULT_INSTANCE();
77

8+
// Some boards don't have this set (ESP32)
9+
#ifndef LED_BUILTIN
10+
#define LED_BUILTIN 0
11+
#endif
12+
813
void handleError(int8_t err)
914
{
1015
digitalWrite(LED_BUILTIN, (err == 0)? LOW : HIGH);

examples/ReceiverActiveSensing/ReceiverActiveSensing.ino

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#include <MIDI.h>
22
USING_NAMESPACE_MIDI
33

4+
// Some boards don't have this set (ESP32)
5+
#ifndef LED_BUILTIN
6+
#define LED_BUILTIN 0
7+
#endif
8+
49
struct MyMIDISettings : public MIDI_NAMESPACE::DefaultSettings
510
{
611
// When setting UseReceiverActiveSensing to true, MIDI.read() *must* be called

0 commit comments

Comments
 (0)