Do and usart test

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
EvanWu_1
Date:
Thu Mar 28 11:18:06 2019 +0000
Commit message:
Do and usart test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Mar 28 11:18:06 2019 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include <DigitalOut.h> 
+//DigitalOut myled(LED1);
+DigitalOut myled(PD_13);
+
+//Serial usart1(PB_6,PB_7,9600);//RS232通讯端口为PD8,PD9
+//Serial usart3(PD_8,PD_9,9600);//RS232通讯端口为PD8,PD9
+//Serial usart3(PB_10,PB_11,9600);//RS232通讯端口为PD8,PD9
+//Serial usart3(PC_10,PC_11,9600);//RS232通讯端口为PD8,PD9
+//Serial usart1(PA_9,PA_10,9600);//RS232通讯端口为PD8,PD9
+//Serial usart1(PA_9,PB_7,9600);//RS232通讯端口为PD8,PD9
+//Serial usart2(PA_2,PA_3,9600);//RS232通讯端口为PD8,PD9
+Serial usart6(PC_6,PC_7,9600);//RS232通讯端口为PD8,PD9
+int main() {
+    while(1) {
+        myled = 1;
+        wait(0.5);
+        myled = 0;
+        wait(0.5);    
+        //usart1.printf("Hello World\n");
+        //usart2.printf("Hello World\n");          
+        usart6.printf("Hello World\n");   
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Mar 28 11:18:06 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/3a7713b1edbc
\ No newline at end of file