浏览代码

Compiler defines USBCON for USB devices (PR#2433)

Richard Wackerbarth 10 年前
父节点
当前提交
e83575537a

+ 1
- 1
Marlin/Conditionals.h 查看文件

@@ -210,7 +210,7 @@
210 210
 
211 211
   #include "pins.h"
212 212
 
213
-  #ifndef AT90USB
213
+  #ifndef USBCON
214 214
     #define HardwareSerial_h // trick to disable the standard HWserial
215 215
   #endif
216 216
 

+ 2
- 2
Marlin/Marlin.h 查看文件

@@ -43,7 +43,7 @@ typedef unsigned long millis_t;
43 43
   #define analogInputToDigitalPin(p) ((p) + 0xA0)
44 44
 #endif
45 45
 
46
-#ifdef AT90USB
46
+#ifdef USBCON
47 47
   #include "HardwareSerial.h"
48 48
 #endif
49 49
 
@@ -58,7 +58,7 @@ typedef unsigned long millis_t;
58 58
 
59 59
 #include "WString.h"
60 60
 
61
-#ifdef AT90USB
61
+#ifdef USBCON
62 62
   #ifdef BTENABLED
63 63
     #define MYSERIAL bt
64 64
   #else

+ 3
- 3
Marlin/MarlinSerial.cpp 查看文件

@@ -23,7 +23,7 @@
23 23
 #include "Marlin.h"
24 24
 #include "MarlinSerial.h"
25 25
 
26
-#ifndef AT90USB
26
+#ifndef USBCON
27 27
 // this next line disables the entire HardwareSerial.cpp, 
28 28
 // this is so I can support Attiny series and any other chip without a UART
29 29
 #if defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H)
@@ -284,9 +284,9 @@ void MarlinSerial::printFloat(double number, uint8_t digits) {
284 284
 MarlinSerial MSerial;
285 285
 
286 286
 #endif // whole file
287
-#endif // !AT90USB
287
+#endif // !USBCON
288 288
 
289 289
 // For AT90USB targets use the UART for BT interfacing
290
-#if defined(AT90USB) && defined(BTENABLED)
290
+#if defined(USBCON) && defined(BTENABLED)
291 291
   HardwareSerial bt;
292 292
 #endif

+ 3
- 3
Marlin/MarlinSerial.h 查看文件

@@ -64,7 +64,7 @@
64 64
 #define BYTE 0
65 65
 
66 66
 
67
-#ifndef AT90USB
67
+#ifndef USBCON
68 68
 // Define constants and variables for buffering incoming serial data.  We're
69 69
 // using a ring buffer (I think), in which rx_buffer_head is the index of the
70 70
 // location to which to write the next incoming character and rx_buffer_tail
@@ -150,10 +150,10 @@ class MarlinSerial { //: public Stream
150 150
 };
151 151
 
152 152
 extern MarlinSerial MSerial;
153
-#endif // !AT90USB
153
+#endif // !USBCON
154 154
 
155 155
 // Use the UART for BT in AT90USB configurations
156
-#if defined(AT90USB) && defined(BTENABLED)
156
+#if defined(USBCON) && defined(BTENABLED)
157 157
   extern HardwareSerial bt;
158 158
 #endif
159 159
 

+ 0
- 2
Marlin/pins_5DPRINT.h 查看文件

@@ -8,8 +8,6 @@
8 8
   #error Oops!  Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
9 9
 #endif
10 10
 
11
-#define AT90USB 1286  // Disable MarlinSerial etc.
12
-
13 11
 #define LARGE_FLASH        true
14 12
 
15 13
 #define X_STEP_PIN          0

+ 0
- 2
Marlin/pins_BRAINWAVE.h 查看文件

@@ -9,8 +9,6 @@
9 9
   #error Oops!  Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
10 10
 #endif
11 11
 
12
-#define AT90USB 646  // Disable MarlinSerial etc.
13
-
14 12
 #define X_STEP_PIN         27
15 13
 #define X_DIR_PIN          29
16 14
 #define X_ENABLE_PIN       28

+ 2
- 2
Marlin/pins_BRAINWAVE_PRO.h 查看文件

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Brainwave Pro pin assignments (AT90USB186)
2
+ * Brainwave Pro pin assignments (AT90USB1286)
3 3
  *
4 4
  * Requires hardware bundle for Arduino:
5 5
  * https://github.com/unrepentantgeek/brainwave-arduino
@@ -15,7 +15,7 @@
15 15
   #error  Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config
16 16
 #endif
17 17
 
18
-#define AT90USB 1286  // Disable MarlinSerial etc.
18
+#define LARGE_FLASH        true
19 19
 
20 20
 #define X_STEP_PIN         33
21 21
 #define X_DIR_PIN          32

+ 0
- 2
Marlin/pins_PRINTRBOARD.h 查看文件

@@ -13,8 +13,6 @@
13 13
   #error These Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h
14 14
 #endif
15 15
 
16
-#define AT90USB 1286  // Disable MarlinSerial etc.
17
-
18 16
 #define LARGE_FLASH        true
19 17
 
20 18
 #define X_STEP_PIN          0

+ 0
- 2
Marlin/pins_SAV_MKI.h 查看文件

@@ -9,8 +9,6 @@
9 9
   #error Oops!  Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
10 10
 #endif
11 11
 
12
-#define AT90USB 1286  // Disable MarlinSerial etc.
13
-
14 12
 #define LARGE_FLASH        true
15 13
 
16 14
 #define X_STEP_PIN         0

+ 0
- 2
Marlin/pins_TEENSY2.h 查看文件

@@ -52,8 +52,6 @@
52 52
   // (or build from command line)
53 53
 #endif
54 54
 
55
-#define AT90USB 1286  // Disable MarlinSerial etc.
56
-
57 55
 #define LARGE_FLASH        true
58 56
 
59 57
 #define X_STEP_PIN         28 //  0 Marlin

+ 0
- 2
Marlin/pins_TEENSYLU.h 查看文件

@@ -13,8 +13,6 @@
13 13
   #error These Teensylu assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h
14 14
 #endif
15 15
 
16
-#define AT90USB 1286  // Disable MarlinSerial etc.
17
-
18 16
 #define LARGE_FLASH        true
19 17
 
20 18
 #define X_STEP_PIN          0

+ 1
- 1
Marlin/stepper.cpp 查看文件

@@ -629,7 +629,7 @@ ISR(TIMER1_COMPA_vect) {
629 629
 
630 630
     // Take multiple steps per interrupt (For high speed moves)
631 631
     for (int8_t i = 0; i < step_loops; i++) {
632
-      #ifndef AT90USB
632
+      #ifndef USBCON
633 633
         MSerial.checkRx(); // Check for serial chars.
634 634
       #endif
635 635
 

正在加载...
取消
保存