mirror of https://github.com/ARMmbed/mbed-os.git
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.pull/9768/head
parent
930b29dd83
commit
a4a3b3d429
|
|
@ -56,10 +56,6 @@
|
|||
#define SERIAL_LOOPBACK_REPS 100
|
||||
#define USB_RECONNECT_DELAY_MS 1
|
||||
|
||||
// Additional delay necessary for Windows hosts
|
||||
// to handle the reconnect operation correctly.
|
||||
#define USB_DISCONNECT_DELAY_MS 1
|
||||
|
||||
#define LINE_CODING_STRLEN 13 // 6 + 2 + 1 + 1 + 3 * comma
|
||||
|
||||
#define USB_DEV_SN_LEN (32) // 32 hex digit UUID
|
||||
|
|
@ -283,7 +279,6 @@ void test_cdc_usb_reconnect()
|
|||
TEST_ASSERT_TRUE(usb_cdc.configured());
|
||||
TEST_ASSERT_TRUE(usb_cdc.ready());
|
||||
|
||||
wait_ms(USB_DISCONNECT_DELAY_MS);
|
||||
// Disconnect the USB device.
|
||||
usb_cdc.disconnect();
|
||||
TEST_ASSERT_FALSE(usb_cdc.configured());
|
||||
|
|
@ -305,7 +300,6 @@ void test_cdc_usb_reconnect()
|
|||
TEST_ASSERT_TRUE(usb_cdc.configured());
|
||||
TEST_ASSERT_TRUE(usb_cdc.ready());
|
||||
|
||||
wait_ms(USB_DISCONNECT_DELAY_MS);
|
||||
// Disconnect the USB device again.
|
||||
usb_cdc.disconnect();
|
||||
TEST_ASSERT_FALSE(usb_cdc.configured());
|
||||
|
|
@ -525,7 +519,6 @@ void test_serial_usb_reconnect()
|
|||
TEST_ASSERT_EQUAL_INT(0, usb_serial.readable());
|
||||
|
||||
// Disconnect the USB device.
|
||||
wait_ms(USB_DISCONNECT_DELAY_MS);
|
||||
usb_serial.disconnect();
|
||||
TEST_ASSERT_FALSE(usb_serial.configured());
|
||||
TEST_ASSERT_FALSE(usb_serial.connected());
|
||||
|
|
@ -552,7 +545,6 @@ void test_serial_usb_reconnect()
|
|||
TEST_ASSERT_EQUAL_INT(0, usb_serial.readable());
|
||||
|
||||
// Disconnect the USB device again.
|
||||
wait_ms(USB_DISCONNECT_DELAY_MS);
|
||||
usb_serial.disconnect();
|
||||
TEST_ASSERT_FALSE(usb_serial.configured());
|
||||
TEST_ASSERT_FALSE(usb_serial.connected());
|
||||
|
|
|
|||
Loading…
Reference in New Issue