Browse Source

Compiler defines USBCON for USB devices (PR#2433)

Richard Wackerbarth 10 years ago
parent
commit
e83575537a

+ 1
- 1
Marlin/Conditionals.h View File

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

+ 2
- 2
Marlin/Marlin.h View File

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

+ 3
- 3
Marlin/MarlinSerial.cpp View File

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

+ 3
- 3
Marlin/MarlinSerial.h View File

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

+ 0
- 2
Marlin/pins_5DPRINT.h View File

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

+ 0
- 2
Marlin/pins_BRAINWAVE.h View File

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

+ 2
- 2
Marlin/pins_BRAINWAVE_PRO.h View File

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

+ 0
- 2
Marlin/pins_PRINTRBOARD.h View File

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

+ 0
- 2
Marlin/pins_SAV_MKI.h View File

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

+ 0
- 2
Marlin/pins_TEENSY2.h View File

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

+ 0
- 2
Marlin/pins_TEENSYLU.h View File

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

+ 1
- 1
Marlin/stepper.cpp View File

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

Loading…
Cancel
Save