Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 1:ce7379fdc895
- Parent:
- 0:89673a0f505b
- Child:
- 2:1193fb25edf8
--- a/main.cpp Fri Jan 03 19:06:51 2020 +0000
+++ b/main.cpp Fri Jan 03 21:34:25 2020 +0000
@@ -1,13 +1,15 @@
#define MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE 9600
#define MBED_CONF_PLATFORM_CTHUNK_COUNT_MAX 8
+#define MBED_CONF_TARGET_STDIO_UART_RX PB_4
+//#define MBED_CONF_TARGET_STDIO_UART_RX
#include "mbed.h"
#include "3ATIBoardIO.h"
-//Serial pc(USBTX, USBRX,9600);
-Serial rs232( PA_2,PB_4,9600);
+Serial pc(USBTX, STDIO_UART_RX,9600);
+//Serial rs232( PA_2,PB_4,9600);
//Serial rs232( A7,A2,9600);
//I2C i2c(I2C_SDA_PIN,I2C_SCL_PIN);
@@ -25,14 +27,14 @@
{
i='a';
}
- int c = rs232.getc();
- //int a = pc.getc();
+ //int c = rs232.getc();
+ int a = pc.getc();
//led1=1;
//wait(0.5);
led1=!led1;
wait(0.2);
- rs232.putc(c);
- //pc.putc(a);
+ //rs232.putc(c);
+ pc.putc(a);
led=!led;
//rs232.putc(i);