Browse Source

Revert at90usb1286 conditional (#19733)

Jason Smith 4 years ago
parent
commit
90d364fc37
No account linked to committer's email address

+ 2
- 2
Marlin/src/HAL/AVR/HAL.h View File

25
 #include "watchdog.h"
25
 #include "watchdog.h"
26
 #include "math.h"
26
 #include "math.h"
27
 
27
 
28
-#ifdef IS_AT90USB
28
+#ifdef USBCON
29
   #include <HardwareSerial.h>
29
   #include <HardwareSerial.h>
30
 #else
30
 #else
31
   #define HardwareSerial_h // Hack to prevent HardwareSerial.h header inclusion
31
   #define HardwareSerial_h // Hack to prevent HardwareSerial.h header inclusion
81
 //extern uint8_t MCUSR;
81
 //extern uint8_t MCUSR;
82
 
82
 
83
 // Serial ports
83
 // Serial ports
84
-#ifdef IS_AT90USB
84
+#ifdef USBCON
85
   #define MYSERIAL0 TERN(BLUETOOTH, bluetoothSerial, Serial)
85
   #define MYSERIAL0 TERN(BLUETOOTH, bluetoothSerial, Serial)
86
 #else
86
 #else
87
   #if !WITHIN(SERIAL_PORT, -1, 3)
87
   #if !WITHIN(SERIAL_PORT, -1, 3)

+ 3
- 3
Marlin/src/HAL/AVR/MarlinSerial.cpp View File

38
 
38
 
39
 #include "../../inc/MarlinConfig.h"
39
 #include "../../inc/MarlinConfig.h"
40
 
40
 
41
-#if !IS_AT90USB && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
41
+#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
42
 
42
 
43
 #include "MarlinSerial.h"
43
 #include "MarlinSerial.h"
44
 #include "../../MarlinCore.h"
44
 #include "../../MarlinCore.h"
792
 
792
 
793
 #endif
793
 #endif
794
 
794
 
795
-#endif // !IS_AT90USB && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
795
+#endif // !USBCON && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
796
 
796
 
797
 // For AT90USB targets use the UART for BT interfacing
797
 // For AT90USB targets use the UART for BT interfacing
798
-#if BOTH(IS_AT90USB, BLUETOOTH)
798
+#if defined(USBCON) && ENABLED(BLUETOOTH)
799
   HardwareSerial bluetoothSerial;
799
   HardwareSerial bluetoothSerial;
800
 #endif
800
 #endif
801
 
801
 

+ 1
- 1
Marlin/src/HAL/AVR/MarlinSerial.h View File

327
 #endif
327
 #endif
328
 
328
 
329
 // Use the UART for Bluetooth in AT90USB configurations
329
 // Use the UART for Bluetooth in AT90USB configurations
330
-#if BOTH(IS_AT90USB, BLUETOOTH)
330
+#if defined(USBCON) && ENABLED(BLUETOOTH)
331
   extern HardwareSerial bluetoothSerial;
331
   extern HardwareSerial bluetoothSerial;
332
 #endif
332
 #endif

+ 2
- 2
Marlin/src/gcode/control/M111.cpp View File

55
   }
55
   }
56
   else {
56
   else {
57
     SERIAL_ECHOPGM(STR_DEBUG_OFF);
57
     SERIAL_ECHOPGM(STR_DEBUG_OFF);
58
-    #if !IS_AT90USB
58
+    #if !defined(__AVR__) || !defined(USBCON)
59
       #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
59
       #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
60
         SERIAL_ECHOPAIR("\nBuffer Overruns: ", MYSERIAL0.buffer_overruns());
60
         SERIAL_ECHOPAIR("\nBuffer Overruns: ", MYSERIAL0.buffer_overruns());
61
       #endif
61
       #endif
71
       #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
71
       #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
72
         SERIAL_ECHOPAIR("\nMax RX Queue Size: ", MYSERIAL0.rxMaxEnqueued());
72
         SERIAL_ECHOPAIR("\nMax RX Queue Size: ", MYSERIAL0.rxMaxEnqueued());
73
       #endif
73
       #endif
74
-    #endif // !IS_AT90USB
74
+    #endif // !__AVR__ || !USBCON
75
   }
75
   }
76
   SERIAL_EOL();
76
   SERIAL_EOL();
77
 }
77
 }

+ 1
- 1
Marlin/src/gcode/queue.cpp View File

624
         card.closefile();
624
         card.closefile();
625
         SERIAL_ECHOLNPGM(STR_FILE_SAVED);
625
         SERIAL_ECHOLNPGM(STR_FILE_SAVED);
626
 
626
 
627
-        #if !IS_AT90USB
627
+        #if !defined(__AVR__) || !defined(USBCON)
628
           #if ENABLED(SERIAL_STATS_DROPPED_RX)
628
           #if ENABLED(SERIAL_STATS_DROPPED_RX)
629
             SERIAL_ECHOLNPAIR("Dropped bytes: ", MYSERIAL0.dropped());
629
             SERIAL_ECHOLNPAIR("Dropped bytes: ", MYSERIAL0.dropped());
630
           #endif
630
           #endif

+ 4
- 4
Marlin/src/inc/Conditionals_adv.h View File

208
   #define NEEDS_HARDWARE_PWM 1
208
   #define NEEDS_HARDWARE_PWM 1
209
 #endif
209
 #endif
210
 
210
 
211
-#if defined(__AVR__) && defined(USBCON)
212
-  #define IS_AT90USB 1
213
-  #undef SERIAL_XON_XOFF // Not supported on USB-native devices
214
-#else
211
+#if !defined(__AVR__) || !defined(USBCON)
215
   // Define constants and variables for buffering serial data.
212
   // Define constants and variables for buffering serial data.
216
   // Use only 0 or powers of 2 greater than 1
213
   // Use only 0 or powers of 2 greater than 1
217
   // : [0, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...]
214
   // : [0, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...]
223
   #ifndef TX_BUFFER_SIZE
220
   #ifndef TX_BUFFER_SIZE
224
     #define TX_BUFFER_SIZE 32
221
     #define TX_BUFFER_SIZE 32
225
   #endif
222
   #endif
223
+#else
224
+  // SERIAL_XON_XOFF not supported on USB-native devices
225
+  #undef SERIAL_XON_XOFF
226
 #endif
226
 #endif
227
 
227
 
228
 #if ENABLED(HOST_ACTION_COMMANDS)
228
 #if ENABLED(HOST_ACTION_COMMANDS)

+ 3
- 3
Marlin/src/inc/SanityCheck.h View File

582
 /**
582
 /**
583
  * Serial
583
  * Serial
584
  */
584
  */
585
-#if !IS_AT90USB
585
+#if !(defined(__AVR__) && defined(USBCON))
586
   #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
586
   #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
587
     #error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
587
     #error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
588
   #elif RX_BUFFER_SIZE && (RX_BUFFER_SIZE < 2 || !IS_POWER_OF_2(RX_BUFFER_SIZE))
588
   #elif RX_BUFFER_SIZE && (RX_BUFFER_SIZE < 2 || !IS_POWER_OF_2(RX_BUFFER_SIZE))
2108
 #endif
2108
 #endif
2109
 
2109
 
2110
 /**
2110
 /**
2111
- * Emergency Command Parser
2111
+ * emergency-command parser
2112
  */
2112
  */
2113
-#if BOTH(IS_AT90USB, EMERGENCY_PARSER)
2113
+#if ENABLED(EMERGENCY_PARSER) && defined(__AVR__) && defined(USBCON)
2114
   #error "EMERGENCY_PARSER does not work on boards with AT90USB processors (USBCON)."
2114
   #error "EMERGENCY_PARSER does not work on boards with AT90USB processors (USBCON)."
2115
 #endif
2115
 #endif
2116
 
2116
 

Loading…
Cancel
Save