Browse Source

🔧 No Native USB on AVR (#24906)

ellensp 2 years ago
parent
commit
437cc48470
No account linked to committer's email address
1 changed files with 11 additions and 10 deletions
  1. 11
    10
      Marlin/src/HAL/AVR/HAL.h

+ 11
- 10
Marlin/src/HAL/AVR/HAL.h View File

32
   #include <HardwareSerial.h>
32
   #include <HardwareSerial.h>
33
 #else
33
 #else
34
   #include "MarlinSerial.h"
34
   #include "MarlinSerial.h"
35
+  #define BOARD_NO_NATIVE_USB
35
 #endif
36
 #endif
36
 
37
 
37
 #include <stdint.h>
38
 #include <stdint.h>
106
 
107
 
107
   #define MYSERIAL1 TERN(BLUETOOTH, btSerial, MSerial0)
108
   #define MYSERIAL1 TERN(BLUETOOTH, btSerial, MSerial0)
108
 #else
109
 #else
109
-  #if !WITHIN(SERIAL_PORT, -1, 3)
110
-    #error "SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
110
+  #if !WITHIN(SERIAL_PORT, 0, 3)
111
+    #error "SERIAL_PORT must be from 0 to 3."
111
   #endif
112
   #endif
112
   #define MYSERIAL1 customizedSerial1
113
   #define MYSERIAL1 customizedSerial1
113
 
114
 
114
   #ifdef SERIAL_PORT_2
115
   #ifdef SERIAL_PORT_2
115
-    #if !WITHIN(SERIAL_PORT_2, -1, 3)
116
-      #error "SERIAL_PORT_2 must be from 0 to 3, or -1 for USB Serial."
116
+    #if !WITHIN(SERIAL_PORT_2, 0, 3)
117
+      #error "SERIAL_PORT_2 must be from 0 to 3."
117
     #endif
118
     #endif
118
     #define MYSERIAL2 customizedSerial2
119
     #define MYSERIAL2 customizedSerial2
119
   #endif
120
   #endif
120
 
121
 
121
   #ifdef SERIAL_PORT_3
122
   #ifdef SERIAL_PORT_3
122
-    #if !WITHIN(SERIAL_PORT_3, -1, 3)
123
-      #error "SERIAL_PORT_3 must be from 0 to 3, or -1 for USB Serial."
123
+    #if !WITHIN(SERIAL_PORT_3, 0, 3)
124
+      #error "SERIAL_PORT_3 must be from 0 to 3."
124
     #endif
125
     #endif
125
     #define MYSERIAL3 customizedSerial3
126
     #define MYSERIAL3 customizedSerial3
126
   #endif
127
   #endif
127
 #endif
128
 #endif
128
 
129
 
129
 #ifdef MMU2_SERIAL_PORT
130
 #ifdef MMU2_SERIAL_PORT
130
-  #if !WITHIN(MMU2_SERIAL_PORT, -1, 3)
131
-    #error "MMU2_SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
131
+  #if !WITHIN(MMU2_SERIAL_PORT, 0, 3)
132
+    #error "MMU2_SERIAL_PORT must be from 0 to 3"
132
   #endif
133
   #endif
133
   #define MMU2_SERIAL mmuSerial
134
   #define MMU2_SERIAL mmuSerial
134
 #endif
135
 #endif
135
 
136
 
136
 #ifdef LCD_SERIAL_PORT
137
 #ifdef LCD_SERIAL_PORT
137
-  #if !WITHIN(LCD_SERIAL_PORT, -1, 3)
138
-    #error "LCD_SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
138
+  #if !WITHIN(LCD_SERIAL_PORT, 0, 3)
139
+    #error "LCD_SERIAL_PORT must be from 0 to 3."
139
   #endif
140
   #endif
140
   #define LCD_SERIAL lcdSerial
141
   #define LCD_SERIAL lcdSerial
141
   #if HAS_DGUS_LCD
142
   #if HAS_DGUS_LCD

Loading…
Cancel
Save