Ported more tests to NUCLEO_F103RB

pull/124/merge
Bogdan Marinescu 2013-12-12 19:49:47 +02:00
parent a164c6f498
commit f5e1f7037f
3 changed files with 12 additions and 2 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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.