mirror of https://github.com/ARMmbed/mbed-os.git
Ported more tests to NUCLEO_F103RB
parent
a164c6f498
commit
f5e1f7037f
|
@ -1,9 +1,17 @@
|
|||
#include "mbed.h"
|
||||
|
||||
#ifdef TARGET_NUCLEO_F103RB
|
||||
#define TXPIN SERIAL_TX
|
||||
#define RXPIN SERIAL_RX
|
||||
#else
|
||||
#define TXPIN USBTX
|
||||
#define RXPIN USBRX
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
char buf[256];
|
||||
|
||||
Serial pc(USBTX, USBRX);
|
||||
Serial pc(TXPIN, RXPIN);
|
||||
pc.baud(115200);
|
||||
|
||||
while (1) {
|
||||
|
|
|
@ -30,6 +30,8 @@ static const int i2c_delay_us = 0;
|
|||
|
||||
#if defined(TARGET_KL25Z)
|
||||
I2C i2c(PTE0, PTE1);
|
||||
#elif defined(TARGET_NUCLEO_F103RB)
|
||||
I2C i2c(I2C_SDA, I2C_SCL);
|
||||
#else
|
||||
I2C i2c(p28, p27);
|
||||
#endif
|
||||
|
|
|
@ -6,7 +6,7 @@ DigitalOut led2(LED2);
|
|||
#ifndef TARGET_NUCLEO_F103RB
|
||||
Serial computer(USBTX, USBRX);
|
||||
#else
|
||||
Serial computer(UART_TX, UART_RX);
|
||||
Serial computer(SERIAL_TX, SERIAL_RX);
|
||||
#endif
|
||||
|
||||
// This function is called when a character goes into the TX buffer.
|
||||
|
|
Loading…
Reference in New Issue