1st release (without comment)

Revision:
4:cd5fb2575b50
Parent:
3:ff36fb2cefb0
Child:
5:4ffe57c4bfaa
--- a/RMS_UART.cpp	Thu Sep 15 23:05:27 2016 +0000
+++ b/RMS_UART.cpp	Fri Sep 16 00:02:43 2016 +0000
@@ -122,7 +122,7 @@
     if(Content_index == CONTENT_BUF_SIZE)
     {
         /* Call function for check contents */
-        serial_device.printf("\n -- File is too large!!\n");
+        serial_device.printf("\n -- File is too large!!\r\n");
         ClearCmdIndexAndBuf();
         ClearContentIndexAndBuf();
         ClearFileNameBuf();
@@ -177,15 +177,22 @@
         /* Request system restart */
         NVIC_SystemReset();
     }
+    /* Command type is help ($-h) */
+    else if(strstr(Msg_RxBuf,CMD_HELP))
+    {
+        /* List all command */
+        GetHelpCmd();
+    }
     /* Command may be mismatched type */
     else
     {
         /* Not receive true type command */
         if(Msg_index >= MSG2CMD)
         {
-            if(!((strstr(Msg_RxBuf,CMD_LISTFILE)) || 
+            if(!((strstr(Msg_RxBuf,CMD_LISTFILE))  || 
                   (strstr(Msg_RxBuf,CMD_READFILE)) || 
-                  (strstr(Msg_RxBuf,CMD_WRITEFILE) || 
+                  (strstr(Msg_RxBuf,CMD_WRITEFILE) ||
+                  (strstr(Msg_RxBuf,CMD_HELP) || 
                   (strstr(Msg_RxBuf,CMD_DELETEFILE)))))
             {
                 /* Call command error function */ 
@@ -299,6 +306,23 @@
 }
 
 /**
+ * @brief   Command help
+ * @note    $-h
+ * @retval
+ */
+void GetHelpCmd()
+{   
+    serial_deive.printf("\n$ls : List fils as in directory");
+    serial_deive.printf("\n$rd [File Name] : Read fils as file name");
+    serial_deive.printf("\n$df [File Name] : Delete fils as file name");
+    serial_deive.printf("\n$ed [File Name] : Write/Create fils as in directory");
+    serial_deive.printf("\n$rs : Mini-RMS system restart");
+    serial_deive.printf("\n$df : List fils as in directory");
+    
+    /* Clear buffer */
+    ClearCmdIndexAndBuf();
+}
+/**
  * @brief   Clear index and buffer of command and file name
  * @note    
  * @retval
@@ -335,4 +359,4 @@
 {   
     /* Clear buffer */
     memset(FileName,' ',MSG2FILENAME);
-}
\ No newline at end of file
+}