Browse Source

🔧 No Native USB on AVR (#24906)

ellensp 1 year 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,6 +32,7 @@
32 32
   #include <HardwareSerial.h>
33 33
 #else
34 34
   #include "MarlinSerial.h"
35
+  #define BOARD_NO_NATIVE_USB
35 36
 #endif
36 37
 
37 38
 #include <stdint.h>
@@ -106,36 +107,36 @@ typedef Servo hal_servo_t;
106 107
 
107 108
   #define MYSERIAL1 TERN(BLUETOOTH, btSerial, MSerial0)
108 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 112
   #endif
112 113
   #define MYSERIAL1 customizedSerial1
113 114
 
114 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 118
     #endif
118 119
     #define MYSERIAL2 customizedSerial2
119 120
   #endif
120 121
 
121 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 125
     #endif
125 126
     #define MYSERIAL3 customizedSerial3
126 127
   #endif
127 128
 #endif
128 129
 
129 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 133
   #endif
133 134
   #define MMU2_SERIAL mmuSerial
134 135
 #endif
135 136
 
136 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 140
   #endif
140 141
   #define LCD_SERIAL lcdSerial
141 142
   #if HAS_DGUS_LCD

Loading…
Cancel
Save