Modify serial nc tests init part

During initialization phase of the 2 NC serial tests,
there is a character being sent from host to target,
based on MBED_HOSTTEST_START. The problem is that
the target firmware then creates a "new" serial on the
same serial interface. the new or should, or at least may,
induce a reset of the IP, so that the character sent by host
would be lost. So we're moving the new earlier.

the real testing part happens later, to check the next
character is not received or sent.
pull/1781/head
Laurent Meunier 2016-05-25 15:54:17 +02:00
parent ff7d7aa337
commit c35a6f65f2
2 changed files with 4 additions and 3 deletions

View File

@ -2,13 +2,13 @@
#include "test_env.h"
int main() {
Serial *pc = new Serial(USBTX, USBRX);
MBED_HOSTTEST_TIMEOUT(20);
MBED_HOSTTEST_SELECT(serial_nc_rx_auto);
MBED_HOSTTEST_DESCRIPTION(Serial NC RX);
MBED_HOSTTEST_START("MBED_37");
Serial *pc = new Serial(NC, USBRX);
char c = pc->getc();
delete pc;

View File

@ -2,13 +2,14 @@
#include "test_env.h"
int main() {
Serial *pc = new Serial(USBTX, USBRX);
MBED_HOSTTEST_TIMEOUT(20);
MBED_HOSTTEST_SELECT(serial_nc_tx_auto);
MBED_HOSTTEST_DESCRIPTION(Serial NC TX);
MBED_HOSTTEST_START("MBED_38");
// Wait until we receive start signal from host test
Serial *pc = new Serial(USBTX, USBRX);
char c = pc->getc();
delete pc;