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 2727
2828void setup (void )
2929{
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-
3430#ifdef HID_ENABLED
3531 Mouse.begin ();
3632
@@ -41,11 +37,11 @@ void setup(void)
4137#endif
4238
4339#ifdef CDC_ENABLED
44- SERIAL_PORT_USBVIRTUAL .begin (115200 );
40+ SerialUSB .begin (115200 );
4541#endif
4642}
4743
48- char testchar[ 10 ];
44+
4945void loop (void )
5046{
5147#ifdef HID_ENABLED
@@ -68,14 +64,11 @@ void loop(void)
6864#endif
6965
7066#ifdef CDC_ENABLED
71- if (SERIAL_PORT_USBVIRTUAL .available () > 0 )
67+ if (SerialUSB .available () > 0 )
7268 {
7369 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);
7972 }
8073
8174 delay (10 );
You can’t perform that action at this time.
0 commit comments