Stop redefining MOTHERBOARD and #define AT90USB instead. Also put #ifndef AT90USB around the HardwareSerial_h trick, so now Printrboard / Brainwave support compiles on Arduino 1.0.2 as well.
This commit is contained in:
parent
4d351b4846
commit
6cba11f087
|
@ -4,7 +4,9 @@
|
||||||
#ifndef MARLIN_H
|
#ifndef MARLIN_H
|
||||||
#define MARLIN_H
|
#define MARLIN_H
|
||||||
|
|
||||||
|
#ifndef AT90USB
|
||||||
#define HardwareSerial_h // trick to disable the standard HWserial
|
#define HardwareSerial_h // trick to disable the standard HWserial
|
||||||
|
#endif
|
||||||
|
|
||||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||||
|
|
||||||
|
@ -45,7 +47,7 @@
|
||||||
|
|
||||||
#include "WString.h"
|
#include "WString.h"
|
||||||
|
|
||||||
#if MOTHERBOARD == 8 // Teensylu
|
#ifdef AT90USB
|
||||||
#define MYSERIAL Serial
|
#define MYSERIAL Serial
|
||||||
#else
|
#else
|
||||||
#define MYSERIAL MSerial
|
#define MYSERIAL MSerial
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "Marlin.h"
|
#include "Marlin.h"
|
||||||
#include "MarlinSerial.h"
|
#include "MarlinSerial.h"
|
||||||
|
|
||||||
#if MOTHERBOARD != 8 // !teensylu
|
#ifndef AT90USB
|
||||||
// this next line disables the entire HardwareSerial.cpp,
|
// this next line disables the entire HardwareSerial.cpp,
|
||||||
// this is so I can support Attiny series and any other chip without a uart
|
// 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)
|
#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;
|
MarlinSerial MSerial;
|
||||||
|
|
||||||
#endif // whole file
|
#endif // whole file
|
||||||
#endif //teensylu
|
#endif // !AT90USB
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
#define BYTE 0
|
#define BYTE 0
|
||||||
|
|
||||||
|
|
||||||
#if MOTHERBOARD != 8 // ! teensylu
|
#ifndef AT90USB
|
||||||
// Define constants and variables for buffering incoming serial data. We're
|
// 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
|
// 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
|
// location to which to write the next incoming character and rx_buffer_tail
|
||||||
|
@ -179,6 +179,6 @@ class MarlinSerial //: public Stream
|
||||||
};
|
};
|
||||||
|
|
||||||
extern MarlinSerial MSerial;
|
extern MarlinSerial MSerial;
|
||||||
#endif // ! teensylu
|
#endif // !AT90USB
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -963,9 +963,8 @@
|
||||||
* See http://reprap.org/wiki/Printrboard for more info
|
* See http://reprap.org/wiki/Printrboard for more info
|
||||||
****************************************************************************************/
|
****************************************************************************************/
|
||||||
#if MOTHERBOARD == 8 || MOTHERBOARD == 81
|
#if MOTHERBOARD == 8 || MOTHERBOARD == 81
|
||||||
#undef MOTHERBOARD
|
|
||||||
#define MOTHERBOARD 8 // Disable MarlinSerial etc.
|
|
||||||
#define KNOWN_BOARD 1
|
#define KNOWN_BOARD 1
|
||||||
|
#define AT90USB 1286 // Disable MarlinSerial etc.
|
||||||
|
|
||||||
#ifndef __AVR_AT90USB1286__
|
#ifndef __AVR_AT90USB1286__
|
||||||
#error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
|
#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
|
https://github.com/unrepentantgeek/brainwave-arduino
|
||||||
****************************************************************************************/
|
****************************************************************************************/
|
||||||
#if MOTHERBOARD == 82
|
#if MOTHERBOARD == 82
|
||||||
#undef MOTHERBOARD
|
|
||||||
#define MOTHERBOARD 8 // Disable MarlinSerial etc.
|
|
||||||
#define KNOWN_BOARD 1
|
#define KNOWN_BOARD 1
|
||||||
|
#define AT90USB 646 // Disable MarlinSerial etc.
|
||||||
|
|
||||||
#ifndef __AVR_AT90USB646__
|
#ifndef __AVR_AT90USB646__
|
||||||
#error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
|
#error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
|
||||||
|
|
|
@ -478,7 +478,7 @@ ISR(TIMER1_COMPA_vect)
|
||||||
|
|
||||||
|
|
||||||
for(int8_t i=0; i < step_loops; i++) { // Take multiple steps per interrupt (For high speed moves)
|
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.
|
MSerial.checkRx(); // Check for serial chars.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue