diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h index 1c191a3bbd93c3fa5731de1f883e481d33e49572..6741298baf8c7a45fbb727619763ef56095f34b3 100644 --- a/Marlin/Conditionals.h +++ b/Marlin/Conditionals.h @@ -210,7 +210,7 @@ #include "pins.h" - #ifndef AT90USB + #ifndef USBCON #define HardwareSerial_h // trick to disable the standard HWserial #endif diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 58c0618bc8baecc86e6a2a535577f1aea0df583c..50ea9ecf077d6dd3d3025e8f03cc68d16f843574 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -43,7 +43,7 @@ typedef unsigned long millis_t; #define analogInputToDigitalPin(p) ((p) + 0xA0) #endif -#ifdef AT90USB +#ifdef USBCON #include "HardwareSerial.h" #endif @@ -58,7 +58,7 @@ typedef unsigned long millis_t; #include "WString.h" -#ifdef AT90USB +#ifdef USBCON #ifdef BTENABLED #define MYSERIAL bt #else diff --git a/Marlin/MarlinSerial.cpp b/Marlin/MarlinSerial.cpp index dc36e14c6c92576fcdb2c699a83f7f93f47ae58a..0142ce99cc77a9a83ed9b9f156b9339c80249557 100644 --- a/Marlin/MarlinSerial.cpp +++ b/Marlin/MarlinSerial.cpp @@ -23,7 +23,7 @@ #include "Marlin.h" #include "MarlinSerial.h" -#ifndef AT90USB +#ifndef USBCON // 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) @@ -284,9 +284,9 @@ void MarlinSerial::printFloat(double number, uint8_t digits) { MarlinSerial MSerial; #endif // whole file -#endif // !AT90USB +#endif // !USBCON // For AT90USB targets use the UART for BT interfacing -#if defined(AT90USB) && defined(BTENABLED) +#if defined(USBCON) && defined(BTENABLED) HardwareSerial bt; #endif diff --git a/Marlin/MarlinSerial.h b/Marlin/MarlinSerial.h index dbad3fd7626d7e0e563d5223bbf313783c1cde1f..5ef63e67fc17fe67ed27a3586228777f5ac6f07e 100644 --- a/Marlin/MarlinSerial.h +++ b/Marlin/MarlinSerial.h @@ -64,7 +64,7 @@ #define BYTE 0 -#ifndef AT90USB +#ifndef USBCON // 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 @@ -150,10 +150,10 @@ class MarlinSerial { //: public Stream }; extern MarlinSerial MSerial; -#endif // !AT90USB +#endif // !USBCON // Use the UART for BT in AT90USB configurations -#if defined(AT90USB) && defined(BTENABLED) +#if defined(USBCON) && defined(BTENABLED) extern HardwareSerial bt; #endif diff --git a/Marlin/pins_5DPRINT.h b/Marlin/pins_5DPRINT.h index b483326d3b9a7a19821d048e350ad29fc8091725..2ac31bcf0b36c40fd7dff04cdbc04ab98d244bfc 100644 --- a/Marlin/pins_5DPRINT.h +++ b/Marlin/pins_5DPRINT.h @@ -8,8 +8,6 @@ #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu. #endif -#define AT90USB 1286 // Disable MarlinSerial etc. - #define LARGE_FLASH true #define X_STEP_PIN 0 diff --git a/Marlin/pins_BRAINWAVE.h b/Marlin/pins_BRAINWAVE.h index 3e2b1cf13d7e9e43321b8875ba82fb5c5e7df041..5d34ecdc3632c5aba636d696f5ad4761c6366f7e 100644 --- a/Marlin/pins_BRAINWAVE.h +++ b/Marlin/pins_BRAINWAVE.h @@ -9,8 +9,6 @@ #error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu. #endif -#define AT90USB 646 // Disable MarlinSerial etc. - #define X_STEP_PIN 27 #define X_DIR_PIN 29 #define X_ENABLE_PIN 28 diff --git a/Marlin/pins_BRAINWAVE_PRO.h b/Marlin/pins_BRAINWAVE_PRO.h index 8d81605d88515a088627ddc9dcffe5e5cc684947..8f41431ec518ca51358a62f73eb062b66d744c5c 100644 --- a/Marlin/pins_BRAINWAVE_PRO.h +++ b/Marlin/pins_BRAINWAVE_PRO.h @@ -1,5 +1,5 @@ /** - * Brainwave Pro pin assignments (AT90USB186) + * Brainwave Pro pin assignments (AT90USB1286) * * Requires hardware bundle for Arduino: * https://github.com/unrepentantgeek/brainwave-arduino @@ -15,7 +15,7 @@ #error Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config #endif -#define AT90USB 1286 // Disable MarlinSerial etc. +#define LARGE_FLASH true #define X_STEP_PIN 33 #define X_DIR_PIN 32 diff --git a/Marlin/pins_PRINTRBOARD.h b/Marlin/pins_PRINTRBOARD.h index 74deb91570463824c8405ffaa8b79d789c1b2e35..9bf9df30fdcc7352f547adcd6ccce2858f4a3778 100644 --- a/Marlin/pins_PRINTRBOARD.h +++ b/Marlin/pins_PRINTRBOARD.h @@ -13,8 +13,6 @@ #error These Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h #endif -#define AT90USB 1286 // Disable MarlinSerial etc. - #define LARGE_FLASH true #define X_STEP_PIN 0 diff --git a/Marlin/pins_SAV_MKI.h b/Marlin/pins_SAV_MKI.h index d8199e268e9ed4eeb626bc6d09d5a98b9978ac58..a05bfd7f705665c717750308a502d364d119130a 100644 --- a/Marlin/pins_SAV_MKI.h +++ b/Marlin/pins_SAV_MKI.h @@ -9,8 +9,6 @@ #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu. #endif -#define AT90USB 1286 // Disable MarlinSerial etc. - #define LARGE_FLASH true #define X_STEP_PIN 0 diff --git a/Marlin/pins_TEENSY2.h b/Marlin/pins_TEENSY2.h index c7144266ba123a43786d50c52caa8cd00e655dd5..75344f97adc1e7ba6479f8fc276d78552c21916b 100644 --- a/Marlin/pins_TEENSY2.h +++ b/Marlin/pins_TEENSY2.h @@ -52,8 +52,6 @@ // (or build from command line) #endif -#define AT90USB 1286 // Disable MarlinSerial etc. - #define LARGE_FLASH true #define X_STEP_PIN 28 // 0 Marlin diff --git a/Marlin/pins_TEENSYLU.h b/Marlin/pins_TEENSYLU.h index 46da7d299c633b0088821678cd77a0069f401ede..b88e5c0191a8d3a5de0b2e4cca73f62d09648059 100644 --- a/Marlin/pins_TEENSYLU.h +++ b/Marlin/pins_TEENSYLU.h @@ -13,8 +13,6 @@ #error These Teensylu assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h #endif -#define AT90USB 1286 // Disable MarlinSerial etc. - #define LARGE_FLASH true #define X_STEP_PIN 0 diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index c9a0ed3cd1132c4d3d3c3870d30120d891d8fd09..4bf2e1d9ee2844701681289f88deaa19167a9d20 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -629,7 +629,7 @@ ISR(TIMER1_COMPA_vect) { // Take multiple steps per interrupt (For high speed moves) for (int8_t i = 0; i < step_loops; i++) { - #ifndef AT90USB + #ifndef USBCON MSerial.checkRx(); // Check for serial chars. #endif