SNICInterface for ThingPlug Example

Dependents:   ThingPlug_WiFi_Example ThingPlug_WiFi_Example_2

Fork of SNICInterface by muRata

Revision:
38:f13e4e563d65
Parent:
36:f33fcf5975ab
Child:
39:a1233ca02edf
--- a/SNIC/SNIC_UartMsgUtil.cpp	Tue Jun 24 06:24:23 2014 +0000
+++ b/SNIC/SNIC_UartMsgUtil.cpp	Wed Jun 25 00:04:11 2014 +0000
@@ -73,8 +73,7 @@
                                             , unsigned char *command_id_p,  unsigned char *payload_p )
 {
     unsigned short payload_len  = 0;
-    unsigned char *buf = NULL;
-    bool isESC = false;
+    unsigned char *buf_p = NULL;
     int i;
     
     // get payload length
@@ -83,12 +82,12 @@
     // get Command ID
     *command_id_p = (recvdata_p[3] & ~0x80);
 
-    buf = &recvdata_p[4];
+    buf_p = &recvdata_p[4];
 
     // get payload data
-    for( i = 0; i < payload_len; i++, buf++ )
+    for( i = 0; i < payload_len; i++, buf_p++ )
     {
-        *payload_p = *buf;
+        *payload_p = *buf_p;
         payload_p++;
     }
 
@@ -131,7 +130,7 @@
         }
     }
 
-    int   addr  = ( (ipadr[0]<<24) | (ipadr[1]<<16) | (ipadr[2]<<8) | ipadr[3] );
+    int  addr  = ( (ipadr[0]<<24) | (ipadr[1]<<16) | (ipadr[2]<<8) | ipadr[3] );
 
     return addr;
 }