Made unique set of files, to avoid stupid branches.
This commit is contained in:
parent
ad9ba0da58
commit
69604e458b
15
src/MIDI.cpp
15
src/MIDI.cpp
|
|
@ -27,13 +27,20 @@
|
|||
|
||||
#if MIDI_AUTO_INSTANCIATE
|
||||
# if MIDI_USE_SOFTWARE_SERIAL
|
||||
# include "../SoftwareSerial/SoftwareSerial.h"
|
||||
SoftwareSerial softSerialClass(MIDI_SOFTSERIAL_RX_PIN,
|
||||
MIDI_SOFTSERIAL_TX_PIN);
|
||||
# ifndef FSE_AVR
|
||||
# include "../SoftwareSerial/SoftwareSerial.h"
|
||||
SoftwareSerial softSerialClass(MIDI_SOFTSERIAL_RX_PIN,
|
||||
MIDI_SOFTSERIAL_TX_PIN);
|
||||
# else
|
||||
# error Todo: implement SoftwareSerial for avr core.
|
||||
# undef MIDI_SERIAL_PORT
|
||||
# define MIDI_SERIAL_PORT softSerialClass
|
||||
# else
|
||||
# include "HardwareSerial.h"
|
||||
# ifdef FSE_AVR
|
||||
# include <hardware_Serial.h>
|
||||
# else
|
||||
# include "HardwareSerial.h"
|
||||
# endif
|
||||
# endif // MIDI_USE_SOFTWARE_SERIAL
|
||||
|
||||
MIDI_NAMESPACE::MidiInterface MIDI;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,12 @@
|
|||
|
||||
#include "midi_Settings.h"
|
||||
#include "midi_Defs.h"
|
||||
#include "Arduino.h"
|
||||
|
||||
#ifdef FSE_AVR
|
||||
# include "hardware_Serial.h"
|
||||
#else
|
||||
# include "Arduino.h"
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,18 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "midi_Namespace.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#ifdef FSE_AVR
|
||||
# include <core_Types.h>
|
||||
#else
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_MIDI_NAMESPACE
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
@ -26,8 +35,9 @@ BEGIN_MIDI_NAMESPACE
|
|||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
|
||||
#ifndef FSE_AVR
|
||||
typedef uint8_t byte;
|
||||
typedef uint16_t word;
|
||||
#endif
|
||||
|
||||
typedef byte StatusByte;
|
||||
typedef byte DataByte;
|
||||
|
|
|
|||
Loading…
Reference in New Issue