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_AUTO_INSTANCIATE | ||||||
| #   if MIDI_USE_SOFTWARE_SERIAL | #   if MIDI_USE_SOFTWARE_SERIAL | ||||||
| #       include "../SoftwareSerial/SoftwareSerial.h" | #       ifndef FSE_AVR | ||||||
|         SoftwareSerial softSerialClass(MIDI_SOFTSERIAL_RX_PIN, | #           include "../SoftwareSerial/SoftwareSerial.h" | ||||||
|                                        MIDI_SOFTSERIAL_TX_PIN); |             SoftwareSerial softSerialClass(MIDI_SOFTSERIAL_RX_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 | ||||||
| #       include "HardwareSerial.h" | #       ifdef FSE_AVR | ||||||
|  | #           include <hardware_Serial.h> | ||||||
|  | #       else | ||||||
|  | #           include "HardwareSerial.h" | ||||||
|  | #       endif | ||||||
| #   endif // MIDI_USE_SOFTWARE_SERIAL
 | #   endif // MIDI_USE_SOFTWARE_SERIAL
 | ||||||
| 
 | 
 | ||||||
|     MIDI_NAMESPACE::MidiInterface MIDI; |     MIDI_NAMESPACE::MidiInterface MIDI; | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
| 
 | 
 | ||||||
| // -----------------------------------------------------------------------------
 | // -----------------------------------------------------------------------------
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -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; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Francois Best
						Francois Best