UART Command Parser Time Manager Data Store for SD Card for stm32l476 [it's not Licensed as BSD/GPLx]

Dependencies:   mbed SDFileSystem

Revision:
13:7cda5bef6390
Parent:
7:9ab8809f9693
Child:
19:36072b9b79f3
--- a/common/CommandParser.cpp	Wed May 22 09:10:18 2019 +0000
+++ b/common/CommandParser.cpp	Mon May 27 03:07:42 2019 +0000
@@ -32,7 +32,7 @@
     char *head;
     /** skip - empty command*/
     if (pStr[0] == '\0') {
-        pUart->printf("(empty)\n");
+        uprintf("(empty)\n");
         return 0;
     }
     /* protection for buffer overrun */
@@ -41,23 +41,20 @@
     
     /* parsing */
     head = pStr;
-    pUart->printf("%s\n", pStr);
+    uprintf("%s\n", pStr);
     
     /** Command Format ":0 CMD 0000" */
     if (len != CmdLen) {
-        //pUart->printf("[CommandParser::parse] Invalid Command Length\n");
         this->reply(false, CommandParser::CmdReply::InvalidLen);
         return -1;
     }
     /** check Command Header */
     if (head[0] != ':') {
-        //pUart->printf("[CommandParser::parse] Invalid Format\n");
         this->reply(false, CommandParser::CmdReply::InvalidFmt);
         return -1;
     }
     /** check Command DeviceID */
     if ((head[1] - '0') != deviceID) {
-        //pUart->printf("[CommandParser::parse] Ignore (DST is other)\n");
         return 0;
     }
     
@@ -75,7 +72,6 @@
             ruleTable[rn].exarg);
 
     }
-    //pUart->printf("[CommandParser::parse] Invalid Command");
     this->reply(false, CommandParser::CmdReply::InvalidCmd);
     return -1;
 }
@@ -114,7 +110,7 @@
     }
     memcpy(&str[CmdReplyCodePos], replyStr, 4);
     str[CmdReplyEndPos] = '\n';
-    pUart->printf(str);
+    uprintf(str);
 }
 
 /* get currentUart */