From 60ddf167c12be3610cd743f04b3397246d92a9cc Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Thu, 17 Mar 2016 13:55:07 +0000 Subject: [PATCH] Fix yotta examples baud rate. --- yotta/data/example-authcrypt/main.cpp | 6 ++---- yotta/data/example-benchmark/main.cpp | 6 ++---- yotta/data/example-hashing/main.cpp | 6 ++---- yotta/data/example-selftest/main.cpp | 6 ++---- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/yotta/data/example-authcrypt/main.cpp b/yotta/data/example-authcrypt/main.cpp index 83d5566c5..23fad2792 100644 --- a/yotta/data/example-authcrypt/main.cpp +++ b/yotta/data/example-authcrypt/main.cpp @@ -175,10 +175,6 @@ static int example(void) #include "minar/minar.h" static void run() { - /* Use 115200 bps for consistency with other examples */ - Serial pc(USBTX, USBRX); - pc.baud(115200); - MBED_HOSTTEST_TIMEOUT(10); MBED_HOSTTEST_SELECT(default); MBED_HOSTTEST_DESCRIPTION(mbed TLS example authcrypt); @@ -187,6 +183,8 @@ static void run() { } void app_start(int, char*[]) { + /* Use 115200 bps for consistency with other examples */ + get_stdio_serial().baud(115200); minar::Scheduler::postCallback(mbed::util::FunctionPointer0(run).bind()); } diff --git a/yotta/data/example-benchmark/main.cpp b/yotta/data/example-benchmark/main.cpp index 77c70052b..ef38c442b 100644 --- a/yotta/data/example-benchmark/main.cpp +++ b/yotta/data/example-benchmark/main.cpp @@ -935,10 +935,6 @@ int benchmark( int argc, char *argv[] ) #include "minar/minar.h" static void run() { - /* Use 115200 bps for consistency with other examples */ - Serial pc(USBTX, USBRX); - pc.baud(115200); - MBED_HOSTTEST_TIMEOUT(150); MBED_HOSTTEST_SELECT(default); MBED_HOSTTEST_DESCRIPTION(mbed TLS benchmark program); @@ -947,6 +943,8 @@ static void run() { } void app_start(int, char*[]) { + /* Use 115200 bps for consistency with other examples */ + get_stdio_serial().baud(115200); minar::Scheduler::postCallback(mbed::util::FunctionPointer0(run).bind()); } diff --git a/yotta/data/example-hashing/main.cpp b/yotta/data/example-hashing/main.cpp index 27c469ba5..574152ab8 100644 --- a/yotta/data/example-hashing/main.cpp +++ b/yotta/data/example-hashing/main.cpp @@ -155,10 +155,6 @@ int example(void) #include "minar/minar.h" static void run() { - /* Use 115200 bps for consistency with other examples */ - Serial pc(USBTX, USBRX); - pc.baud(115200); - MBED_HOSTTEST_TIMEOUT(10); MBED_HOSTTEST_SELECT(default); MBED_HOSTTEST_DESCRIPTION(mbed TLS example on hashing); @@ -167,6 +163,8 @@ static void run() { } void app_start(int, char*[]) { + /* Use 115200 bps for consistency with other examples */ + get_stdio_serial().baud(115200); minar::Scheduler::postCallback(mbed::util::FunctionPointer0(run).bind()); } diff --git a/yotta/data/example-selftest/main.cpp b/yotta/data/example-selftest/main.cpp index b1b15f13b..0ff5b048e 100644 --- a/yotta/data/example-selftest/main.cpp +++ b/yotta/data/example-selftest/main.cpp @@ -246,10 +246,6 @@ int selftest( int argc, char *argv[] ) #include "minar/minar.h" static void run() { - /* Use 115200 bps for consistency with other examples */ - Serial pc(USBTX, USBRX); - pc.baud(115200); - MBED_HOSTTEST_TIMEOUT(40); MBED_HOSTTEST_SELECT(default); MBED_HOSTTEST_DESCRIPTION(mbed TLS selftest program); @@ -258,6 +254,8 @@ static void run() { } void app_start(int, char*[]) { + /* Use 115200 bps for consistency with other examples */ + get_stdio_serial().baud(115200); minar::Scheduler::postCallback(mbed::util::FunctionPointer0(run).bind()); }