diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 2af7dc97a..cae67ad5e 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -4,7 +4,9 @@ #ifndef MARLIN_H #define MARLIN_H +#ifndef AT90USB #define HardwareSerial_h // trick to disable the standard HWserial +#endif #define FORCE_INLINE __attribute__((always_inline)) inline @@ -45,7 +47,7 @@ #include "WString.h" -#if MOTHERBOARD == 8 // Teensylu +#ifdef AT90USB #define MYSERIAL Serial #else #define MYSERIAL MSerial diff --git a/Marlin/MarlinSerial.cpp b/Marlin/MarlinSerial.cpp index 0d2aceb3f..1358f3859 100644 --- a/Marlin/MarlinSerial.cpp +++ b/Marlin/MarlinSerial.cpp @@ -23,7 +23,7 @@ #include "Marlin.h" #include "MarlinSerial.h" -#if MOTHERBOARD != 8 // !teensylu +#ifndef AT90USB // this next line disables the entire HardwareSerial.cpp, // this is so I can support Attiny series and any other chip without a uart #if defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H) @@ -319,5 +319,4 @@ void MarlinSerial::printFloat(double number, uint8_t digits) MarlinSerial MSerial; #endif // whole file -#endif //teensylu - +#endif // !AT90USB diff --git a/Marlin/MarlinSerial.h b/Marlin/MarlinSerial.h index a48ffbe50..9514730fa 100644 --- a/Marlin/MarlinSerial.h +++ b/Marlin/MarlinSerial.h @@ -65,7 +65,7 @@ #define BYTE 0 -#if MOTHERBOARD != 8 // ! teensylu +#ifndef AT90USB // Define constants and variables for buffering incoming serial data. We're // using a ring buffer (I think), in which rx_buffer_head is the index of the // location to which to write the next incoming character and rx_buffer_tail @@ -179,6 +179,6 @@ class MarlinSerial //: public Stream }; extern MarlinSerial MSerial; -#endif // ! teensylu +#endif // !AT90USB #endif diff --git a/Marlin/pins.h b/Marlin/pins.h index ec708d87a..53da25909 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -963,9 +963,8 @@ * See http://reprap.org/wiki/Printrboard for more info ****************************************************************************************/ #if MOTHERBOARD == 8 || MOTHERBOARD == 81 -#undef MOTHERBOARD -#define MOTHERBOARD 8 // Disable MarlinSerial etc. #define KNOWN_BOARD 1 +#define AT90USB 1286 // Disable MarlinSerial etc. #ifndef __AVR_AT90USB1286__ #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu. @@ -1026,9 +1025,8 @@ https://github.com/unrepentantgeek/brainwave-arduino ****************************************************************************************/ #if MOTHERBOARD == 82 -#undef MOTHERBOARD -#define MOTHERBOARD 8 // Disable MarlinSerial etc. #define KNOWN_BOARD 1 +#define AT90USB 646 // Disable MarlinSerial etc. #ifndef __AVR_AT90USB646__ #error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu. diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index d9c0a45c5..81f26f6be 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -478,10 +478,10 @@ ISR(TIMER1_COMPA_vect) for(int8_t i=0; i < step_loops; i++) { // Take multiple steps per interrupt (For high speed moves) - #if MOTHERBOARD != 8 // !teensylu + #ifndef AT90USB MSerial.checkRx(); // Check for serial chars. - #endif - + #endif + #ifdef ADVANCE counter_e += current_block->steps_e; if (counter_e > 0) {