Skip to content

Commit 7c834dc

Browse files
committed
Test serial - get stdio Serial object, baud set via config
1 parent c0728ac commit 7c834dc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/serial_interrupt/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
DigitalOut led1(LED1);
2121
DigitalOut led2(LED2);
2222

23-
Serial computer(USBTX, USBRX);
23+
Serial& computer = get_stdio_serial();
2424

2525
// This function is called when a character goes into the TX buffer.
2626
void txCallback() {
@@ -38,7 +38,6 @@ void app_start(int, char*[]) {
3838
MBED_HOSTTEST_SELECT(echo);
3939
MBED_HOSTTEST_DESCRIPTION(serial interrupt test);
4040
MBED_HOSTTEST_START("MBED_14");
41-
computer.baud(115200);
4241
computer.attach(&txCallback, Serial::TxIrq);
4342
computer.attach(&rxCallback, Serial::RxIrq);
4443
}

0 commit comments

Comments
 (0)