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_AUTO_INSTANCIATE
# if MIDI_USE_SOFTWARE_SERIAL # if MIDI_USE_SOFTWARE_SERIAL
# ifndef FSE_AVR
# include "../SoftwareSerial/SoftwareSerial.h" # include "../SoftwareSerial/SoftwareSerial.h"
SoftwareSerial softSerialClass(MIDI_SOFTSERIAL_RX_PIN, SoftwareSerial softSerialClass(MIDI_SOFTSERIAL_RX_PIN,
MIDI_SOFTSERIAL_TX_PIN); MIDI_SOFTSERIAL_TX_PIN);
# else
# error Todo: implement SoftwareSerial for avr core.
# undef MIDI_SERIAL_PORT # undef MIDI_SERIAL_PORT
# define MIDI_SERIAL_PORT softSerialClass # define MIDI_SERIAL_PORT softSerialClass
# else # else
# ifdef FSE_AVR
# include <hardware_Serial.h>
# else
# include "HardwareSerial.h" # include "HardwareSerial.h"
# endif
# endif // MIDI_USE_SOFTWARE_SERIAL # endif // MIDI_USE_SOFTWARE_SERIAL
MIDI_NAMESPACE::MidiInterface MIDI; MIDI_NAMESPACE::MidiInterface MIDI;

View File

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

View File

@ -10,9 +10,18 @@
#pragma once #pragma once
#include <inttypes.h>
#include "midi_Namespace.h" #include "midi_Namespace.h"
// -----------------------------------------------------------------------------
#ifdef FSE_AVR
# include <core_Types.h>
#else
# include <inttypes.h>
#endif
// -----------------------------------------------------------------------------
BEGIN_MIDI_NAMESPACE BEGIN_MIDI_NAMESPACE
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@ -26,8 +35,9 @@ BEGIN_MIDI_NAMESPACE
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Type definitions // Type definitions
#ifndef FSE_AVR
typedef uint8_t byte; typedef uint8_t byte;
typedef uint16_t word; #endif
typedef byte StatusByte; typedef byte StatusByte;
typedef byte DataByte; typedef byte DataByte;