Jörg Wempe / Mbed OS Nucleo_L432KC_Test

Dependencies:   BufferedSerial SDFileSystem

Revision:
2:6bb642c850bc
diff -r b08afedb843c -r 6bb642c850bc funktions.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/funktions.h	Tue Apr 09 15:01:50 2019 +0000
@@ -0,0 +1,21 @@
+//funktionen
+
+void sendData(string dataForTX)
+{
+    uint8_t n = dataForTX.length();
+    uint8_t cs = 0;
+    char command[3]= {0x02,0x00,n};
+    for (int p=0; p<3; p++) {
+        cs = cs ^ command[p];
+        AMB.printf("%c",command[p]);
+        // pc.printf("%c",command[p]);
+    }
+    for (int p=0; p<n; p++) {
+        cs = cs ^ dataForTX[p];
+        AMB.printf("%c",dataForTX[p]);
+        // pc.printf("%c",dataForTX[p]);
+    }
+    AMB.printf("%c",cs);
+    //pc.printf("%c",cs);
+}
+