Teensylu support.

This commit is contained in:
Erik van der Zalm
2012-02-09 19:27:45 +01:00
parent da040fd393
commit 9173a5713b
9 changed files with 50 additions and 52 deletions

View File

@ -23,20 +23,15 @@
#include "Marlin.h"
#include "MarlinSerial.h"
#if MOTHERBOARD != 8 // !teensylu
// 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)
#if defined(UBRRH) || defined(UBRR0H)
ring_buffer rx_buffer = { { 0 }, 0, 0 };
#endif
FORCE_INLINE void store_char(unsigned char c)
{
int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
@ -324,11 +319,11 @@ void MarlinSerial::printFloat(double number, uint8_t digits)
remainder -= toPrint;
}
}
// Preinstantiate Objects //////////////////////////////////////////////////////
MarlinSerial MSerial;
#endif // whole file
#endif //teensylu