doppler shift / Mbed 2 deprecated 0xXX_complete

Dependencies:   mbed

Revision:
4:15644c0e4310
Parent:
3:aaeea2abc917
--- a/main.cpp	Fri Dec 11 06:59:04 2020 +0000
+++ b/main.cpp	Fri Dec 11 07:50:16 2020 +0000
@@ -4,19 +4,22 @@
 Serial device(PA_9,PA_10);
 int main()
 {
-
+    device.baud(9600);
+    pc.baud(921600);
     while(1) {
         char c = device.getc();
 
-        if(c == 0xFE) {
-            pc.printf("%02hhx \n",c);
+        if(c == 0xfe) {
+            pc.printf("%02hhx ",c);
             while(1) {
                 c = device.getc();
-                if(c != 0xFD)
-                    pc.printf("%02hhx \n",c);
-                else {
-                    pc.printf("%02hhx \n",c);
+                if(c  == 0xfd){
+                    pc.printf("%02hhx\r\n ",c);
                     break;
+                    }
+                else{
+                    pc.printf("%02hhx ",c);
+                    
                 }
             }
         }