Merge branch 'main' of codeberg.org:dcoredump/MIDI-Host-Adapter

main
Holger Wirtz 1 year ago
commit 2bfda7b460
  1. 16
      MIDI-Host-Adapter.ino

@ -25,9 +25,9 @@
#define DEBUG
#define STROBE_TM 9
#define CLOCK_TM 8
#define DIO_TM 7
#define STROBE_TM 10
#define CLOCK_TM 9
#define DIO_TM 8
#define MIDI_CH_BIT3 3
#define MIDI_CH_BIT2 4
#define MIDI_CH_BIT1 5
@ -148,18 +148,22 @@ void SetMidiChannel(uint8_t channel) {
uint8_t read_channel_from_eeprom(void) {
uint8_t tmp_channel = EEPROM.read(EEPROM_ADDRESS);
uint8_t channel;
if (tmp_channel & 0xf0 != 0xf0) {
actual_channel = 1;
channel = 1;
#if defined(DEBUG)
Serial.println("Setting channel to 1");
#endif
} else {
actual_channel = 0x0f & tmp_channel;
channel = 0x0f & tmp_channel;
#if defined(DEBUG)
Serial.print("Reading channel from EEPROM: ");
Serial.println(actual_channel, DEC);
Serial.println(channel, DEC);
#endif
}
return(channel);
}
#if defined(DEBUG)

Loading…
Cancel
Save