Skip to content

Commit 130f302

Browse files
committed
Remove USB disconnect delay from Serial test
Remove the USB disconnect delay since there is no reason this is needed. Failures which occur without this indicate a device or host problem.
1 parent 1630883 commit 130f302

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

TESTS/usb_device/serial/main.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@
5656
#define SERIAL_LOOPBACK_REPS 100
5757
#define USB_RECONNECT_DELAY_MS 1
5858

59-
// Additional delay necessary for Windows hosts
60-
// to handle the reconnect operation correctly.
61-
#define USB_DISCONNECT_DELAY_MS 1
62-
6359
#define LINE_CODING_STRLEN 13 // 6 + 2 + 1 + 1 + 3 * comma
6460

6561
#define USB_DEV_SN_LEN (32) // 32 hex digit UUID
@@ -283,7 +279,6 @@ void test_cdc_usb_reconnect()
283279
TEST_ASSERT_TRUE(usb_cdc.configured());
284280
TEST_ASSERT_TRUE(usb_cdc.ready());
285281

286-
wait_ms(USB_DISCONNECT_DELAY_MS);
287282
// Disconnect the USB device.
288283
usb_cdc.disconnect();
289284
TEST_ASSERT_FALSE(usb_cdc.configured());
@@ -305,7 +300,6 @@ void test_cdc_usb_reconnect()
305300
TEST_ASSERT_TRUE(usb_cdc.configured());
306301
TEST_ASSERT_TRUE(usb_cdc.ready());
307302

308-
wait_ms(USB_DISCONNECT_DELAY_MS);
309303
// Disconnect the USB device again.
310304
usb_cdc.disconnect();
311305
TEST_ASSERT_FALSE(usb_cdc.configured());
@@ -525,7 +519,6 @@ void test_serial_usb_reconnect()
525519
TEST_ASSERT_EQUAL_INT(0, usb_serial.readable());
526520

527521
// Disconnect the USB device.
528-
wait_ms(USB_DISCONNECT_DELAY_MS);
529522
usb_serial.disconnect();
530523
TEST_ASSERT_FALSE(usb_serial.configured());
531524
TEST_ASSERT_FALSE(usb_serial.connected());
@@ -552,7 +545,6 @@ void test_serial_usb_reconnect()
552545
TEST_ASSERT_EQUAL_INT(0, usb_serial.readable());
553546

554547
// Disconnect the USB device again.
555-
wait_ms(USB_DISCONNECT_DELAY_MS);
556548
usb_serial.disconnect();
557549
TEST_ASSERT_FALSE(usb_serial.configured());
558550
TEST_ASSERT_FALSE(usb_serial.connected());

0 commit comments

Comments
 (0)