Skip to content

Commit f5e1f70

Browse files
author
Bogdan Marinescu
committed
Ported more tests to NUCLEO_F103RB
1 parent a164c6f commit f5e1f70

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

libraries/tests/mbed/echo/main.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
#include "mbed.h"
22

3+
#ifdef TARGET_NUCLEO_F103RB
4+
#define TXPIN SERIAL_TX
5+
#define RXPIN SERIAL_RX
6+
#else
7+
#define TXPIN USBTX
8+
#define RXPIN USBRX
9+
#endif
10+
311
int main() {
412
char buf[256];
513

6-
Serial pc(USBTX, USBRX);
14+
Serial pc(TXPIN, RXPIN);
715
pc.baud(115200);
816

917
while (1) {

libraries/tests/mbed/i2c_eeprom/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ static const int i2c_delay_us = 0;
3030

3131
#if defined(TARGET_KL25Z)
3232
I2C i2c(PTE0, PTE1);
33+
#elif defined(TARGET_NUCLEO_F103RB)
34+
I2C i2c(I2C_SDA, I2C_SCL);
3335
#else
3436
I2C i2c(p28, p27);
3537
#endif

libraries/tests/mbed/serial_interrupt/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DigitalOut led2(LED2);
66
#ifndef TARGET_NUCLEO_F103RB
77
Serial computer(USBTX, USBRX);
88
#else
9-
Serial computer(UART_TX, UART_RX);
9+
Serial computer(SERIAL_TX, SERIAL_RX);
1010
#endif
1111

1212
// This function is called when a character goes into the TX buffer.

0 commit comments

Comments
 (0)