Made unique set of files, to avoid stupid branches.

This commit is contained in:
Francois Best 2012-09-06 20:41:25 +02:00
parent ad9ba0da58
commit 69604e458b
3 changed files with 29 additions and 7 deletions

View File

@ -27,13 +27,20 @@
#if MIDI_AUTO_INSTANCIATE
# if MIDI_USE_SOFTWARE_SERIAL
# 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
# ifdef FSE_AVR
# include <hardware_Serial.h>
# else
# include "HardwareSerial.h"
# endif
# endif // MIDI_USE_SOFTWARE_SERIAL
MIDI_NAMESPACE::MidiInterface MIDI;

View File

@ -12,7 +12,12 @@
#include "midi_Settings.h"
#include "midi_Defs.h"
#ifdef FSE_AVR
# include "hardware_Serial.h"
#else
# include "Arduino.h"
#endif
// -----------------------------------------------------------------------------

View File

@ -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;