Skip to content

Commit 6b1d738

Browse files
ellenspthinkyhead
authored andcommitted
🔧 No Native USB on AVR (MarlinFirmware#24906)
1 parent dd224b4 commit 6b1d738

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

Marlin/src/HAL/AVR/HAL.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <HardwareSerial.h>
3333
#else
3434
#include "MarlinSerial.h"
35+
#define BOARD_NO_NATIVE_USB
3536
#endif
3637

3738
#include <stdint.h>
@@ -106,36 +107,36 @@ typedef Servo hal_servo_t;
106107

107108
#define MYSERIAL1 TERN(BLUETOOTH, btSerial, MSerial0)
108109
#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."
111112
#endif
112113
#define MYSERIAL1 customizedSerial1
113114

114115
#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."
117118
#endif
118119
#define MYSERIAL2 customizedSerial2
119120
#endif
120121

121122
#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."
124125
#endif
125126
#define MYSERIAL3 customizedSerial3
126127
#endif
127128
#endif
128129

129130
#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"
132133
#endif
133134
#define MMU2_SERIAL mmuSerial
134135
#endif
135136

136137
#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."
139140
#endif
140141
#define LCD_SERIAL lcdSerial
141142
#if HAS_DGUS_LCD

0 commit comments

Comments
 (0)