Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
libraries/tests/mbed/serial_nc_tx/main.cpp
- Committer:
- nexpaq
- Date:
- 2016-11-04
- Revision:
- 1:d96dbedaebdb
- Parent:
- 0:6c56fb4bc5f0
File content as of revision 1:d96dbedaebdb:
#include "mbed.h"
#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
    char c = pc->getc();
    delete pc;
    // If signal is correct, start the test
    if (c == 'S') {
      Serial *pc = new Serial(USBTX, NC);
      pc->printf("TX OK - Expected\r\n");
      delete pc;
      pc = new Serial(NC, USBRX);
      pc->printf("TX OK - Unexpected\r\n");
      delete pc;
    }
    while (1) {
    }
}