Skip to content

Commit 391b042

Browse files
author
Mirela Chirica
committed
Cellular: Baud rate setting for TCPSOCKET_RECV_100K greentea test
1 parent c685651 commit 391b042

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "unity/unity.h"
2222
#include "utest.h"
2323
#include "tcp_tests.h"
24+
#include "CellularDevice.h"
2425

2526
using namespace utest::v1;
2627

@@ -119,6 +120,15 @@ void rcv_n_chk_against_rfc864_pattern(TCPSocket &sock)
119120
void TCPSOCKET_RECV_100K()
120121
{
121122
SKIP_IF_TCP_UNSUPPORTED();
123+
124+
#ifdef MBED_CONF_APP_BAUD_RATE
125+
int baudrate;
126+
CellularDevice::get_default_instance()->set_baud_rate(MBED_CONF_APP_BAUD_RATE);
127+
if (CellularDevice::get_default_instance()->get_baud_rate(baudrate) == NSAPI_ERROR_OK) {
128+
printf("\nBaud rate changed to: %d\n", baudrate);
129+
}
130+
#endif
131+
122132
TCPSocket sock;
123133
if (_tcpsocket_connect_to_chargen_srv(sock) != NSAPI_ERROR_OK) {
124134
TEST_FAIL();

0 commit comments

Comments
 (0)