Serial Lib for Process-Visualisation with SvVis3

Dependents:   ProcVisDemo1 bluetooth_0110 Ansteuerung_motor_2509 bluetooth_0110 ... more

Revision:
1:1a03b6d5226f
Parent:
0:b958bdf108cf
--- a/Serial_HL.cpp	Fri Apr 25 18:23:25 2014 +0000
+++ b/Serial_HL.cpp	Thu Apr 07 09:50:12 2016 +0000
@@ -3,6 +3,8 @@
 #include <stdarg.h>
 #include <stdio.h>
 
+// V1.2
+
 namespace mbed {
 
 SerialBLK::SerialBLK(PinName tx, PinName rx) {
@@ -123,6 +125,20 @@
   return cmd;
 }
 
+
+void SvProtocol::ReadCString(char* aBuff, char aTermChar)
+{
+  int ch = _st->GetChar();
+  char* ptr = aBuff;
+  while( ch!=aTermChar )
+  {
+    *ptr=ch; ptr++;
+    ch=_st->GetChar();
+  }
+  *ptr=ch; ptr++;
+  *ptr=0;
+}
+
 } // namespace mbed