File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
cores/validation/validation_usb_device Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 27
27
28
28
void setup (void )
29
29
{
30
- SERIAL_PORT_MONITOR.begin ( 115200 );
31
- while (!SERIAL_PORT_MONITOR); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection
32
- SERIAL_PORT_MONITOR.println (" Start USB device test" );
33
-
34
30
#ifdef HID_ENABLED
35
31
Mouse.begin ();
36
32
@@ -41,11 +37,11 @@ void setup(void)
41
37
#endif
42
38
43
39
#ifdef CDC_ENABLED
44
- SERIAL_PORT_USBVIRTUAL .begin (115200 );
40
+ SerialUSB .begin (115200 );
45
41
#endif
46
42
}
47
43
48
- char testchar[ 10 ];
44
+
49
45
void loop (void )
50
46
{
51
47
#ifdef HID_ENABLED
@@ -68,14 +64,11 @@ void loop(void)
68
64
#endif
69
65
70
66
#ifdef CDC_ENABLED
71
- if (SERIAL_PORT_USBVIRTUAL .available () > 0 )
67
+ if (SerialUSB .available () > 0 )
72
68
{
73
69
char inChar;
74
-
75
- // while( -1 == (inChar = SERIAL_PORT_USBVIRTUAL.read()));
76
- inChar = SERIAL_PORT_USBVIRTUAL.read ();
77
-
78
- SERIAL_PORT_USBVIRTUAL.print (inChar);
70
+ while ( -1 == (inChar = SerialUSB.read ()));
71
+ SerialUSB.print (inChar);
79
72
}
80
73
81
74
delay (10 );
You can’t perform that action at this time.
0 commit comments