stm32l010 rawserial 1r

Dependencies:   mbed

Revision:
0:9f988609da59
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue May 18 20:09:51 2021 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+
+//Serial pc(USBTX, USBRX); // tx, rx
+//Serial pc(SERIAL_TX, SERIAL_RX); //767
+RawSerial pc(PA_2, PA_3); //010
+
+int main() {
+
+    char *ss1; //文字のポインター
+    int ii; //ループカウンター
+
+    //無限ループ
+    while(1) {
+
+        ss1="Hello World !\r\n";
+        ii=0; //ループカウンター
+        while(ss1[ii]!=0){
+            
+            //一文字出力
+            pc.putc(ss1[ii]);ii++;
+                        
+        } //while
+
+        //1秒の待ち
+        wait_ms(1000);
+        
+    } //while
+} //main
+
+//容量削減
+void error(const char* format, ...){}