File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
features/unsupported/tests/mbed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ int main() {
15
15
MBED_HOSTTEST_SELECT (echo);
16
16
MBED_HOSTTEST_DESCRIPTION (Serial Echo at 115200 );
17
17
MBED_HOSTTEST_START (" MBED_A9" );
18
+ wait (0.5 ); // wait for characters to finish transmitting
18
19
19
20
Serial pc (TXPIN, RXPIN);
20
21
pc.baud (115200 );
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ int main() {
15
15
// This should be true, sync the start of test
16
16
if (c == ' S' ) {
17
17
pc->printf (" RX OK - Start NC test\r\n " );
18
+ wait (0.25 ); // wait for characters to finish transmitting
18
19
19
20
// disconnect TX and get char
20
21
delete pc;
@@ -25,11 +26,13 @@ int main() {
25
26
delete pc;
26
27
pc = new Serial (USBTX, NC);
27
28
pc->printf (" RX OK - Expected\r\n " );
29
+ wait (0.25 ); // wait for characters to finish transmitting
28
30
29
31
c = pc->getc ();
30
32
// This should be false/not get here
31
33
if (c == ' U' ) {
32
34
pc->printf (" RX OK - Unexpected\r\n " );
35
+ wait (0.25 ); // wait for characters to finish transmitting
33
36
}
34
37
}
35
38
delete pc;
Original file line number Diff line number Diff line change @@ -17,15 +17,16 @@ int main() {
17
17
if (c == ' S' ) {
18
18
Serial *pc = new Serial (USBTX, NC);
19
19
pc->printf (" TX OK - Expected\r\n " );
20
+ wait (0.5 ); // wait for characters to finish transmitting
21
+
20
22
delete pc;
21
23
22
24
pc = new Serial (NC, USBRX);
23
25
pc->printf (" TX OK - Unexpected\r\n " );
26
+ wait (0.5 ); // wait for characters to finish transmitting
24
27
delete pc;
25
28
}
26
29
27
-
28
-
29
30
while (1 ) {
30
31
}
31
32
}
You can’t perform that action at this time.
0 commit comments