56
56
#define SERIAL_LOOPBACK_REPS 100
57
57
#define USB_RECONNECT_DELAY_MS 1
58
58
59
- // Additional delay necessary for Windows hosts
60
- // to handle the reconnect operation correctly.
61
- #define USB_DISCONNECT_DELAY_MS 1
62
-
63
59
#define LINE_CODING_STRLEN 13 // 6 + 2 + 1 + 1 + 3 * comma
64
60
65
61
#define USB_DEV_SN_LEN (32 ) // 32 hex digit UUID
@@ -283,7 +279,6 @@ void test_cdc_usb_reconnect()
283
279
TEST_ASSERT_TRUE (usb_cdc.configured ());
284
280
TEST_ASSERT_TRUE (usb_cdc.ready ());
285
281
286
- wait_ms (USB_DISCONNECT_DELAY_MS);
287
282
// Disconnect the USB device.
288
283
usb_cdc.disconnect ();
289
284
TEST_ASSERT_FALSE (usb_cdc.configured ());
@@ -305,7 +300,6 @@ void test_cdc_usb_reconnect()
305
300
TEST_ASSERT_TRUE (usb_cdc.configured ());
306
301
TEST_ASSERT_TRUE (usb_cdc.ready ());
307
302
308
- wait_ms (USB_DISCONNECT_DELAY_MS);
309
303
// Disconnect the USB device again.
310
304
usb_cdc.disconnect ();
311
305
TEST_ASSERT_FALSE (usb_cdc.configured ());
@@ -525,7 +519,6 @@ void test_serial_usb_reconnect()
525
519
TEST_ASSERT_EQUAL_INT (0 , usb_serial.readable ());
526
520
527
521
// Disconnect the USB device.
528
- wait_ms (USB_DISCONNECT_DELAY_MS);
529
522
usb_serial.disconnect ();
530
523
TEST_ASSERT_FALSE (usb_serial.configured ());
531
524
TEST_ASSERT_FALSE (usb_serial.connected ());
@@ -552,7 +545,6 @@ void test_serial_usb_reconnect()
552
545
TEST_ASSERT_EQUAL_INT (0 , usb_serial.readable ());
553
546
554
547
// Disconnect the USB device again.
555
- wait_ms (USB_DISCONNECT_DELAY_MS);
556
548
usb_serial.disconnect ();
557
549
TEST_ASSERT_FALSE (usb_serial.configured ());
558
550
TEST_ASSERT_FALSE (usb_serial.connected ());
0 commit comments