ZG2100 Network interface source

Revision:
1:3a7c15057192
Parent:
0:b802fc31f1db
diff -r b802fc31f1db -r 3a7c15057192 drv/zg2100/zg_if.c
--- a/drv/zg2100/zg_if.c	Fri Jul 09 15:37:23 2010 +0000
+++ b/drv/zg2100/zg_if.c	Fri Aug 06 10:23:41 2010 +0000
@@ -44,7 +44,7 @@
         } else {
             DBG("%04X:  ", (i));
         }
-        printf("%02hhx", buffer[i]);
+        DBG("%02hhx", buffer[i]);
         if((i%16) ==  7) { 
             DBG(" ");
         }
@@ -52,7 +52,7 @@
             DBG("\n");
         }
     }
-    printf("\n\n\n");
+    DBG("\n\n\n");
 }
 #else
 #define hexdump(a,b) 
@@ -99,7 +99,7 @@
   
   //hexdump(buf, len);
   
-  DBG("\r\nScan result %d, with %d networks found\r\n", 
+  DBG("\r\nScan result %d, with %d networks found\n", 
   res->result, res->results_count);
   
   if( res->result != 1 )
@@ -110,13 +110,13 @@
   for( i = 0; i < res->results_count; i++ )
   {
     //Display info
-    DBG("\r\n---Result #%2d---\r\n",i+1);
+    DBG("\r\n---Result #%2d---\n",i+1);
     
     memset(ssid, 0, ZG_SSID_LEN + 1);
     memcpy(ssid, it->ssid, it->ssid_len);
-    DBG("SSID : %s\r\n", ssid);
+    DBG("SSID : %s\n", ssid);
 
-    DBG("BSSID : %02x:%02x:%02x:%02x:%02x:%02x\r\n", 
+    DBG("BSSID : %02x:%02x:%02x:%02x:%02x:%02x\n", 
     it->bssid[0], it->bssid[1], it->bssid[2],
     it->bssid[3], it->bssid[4], it->bssid[5]);
     
@@ -127,13 +127,13 @@
       rate = rate * 500;
       DBG("%u Kbps; ", rate);
     }
-    DBG("\r\n");
+    DBG("\n");
     
-    DBG("RSSI : %d\r\n", it->rssi);
-    DBG("Channel : %d\r\n", it->channel);
-    DBG("Type : %d\r\n", it->bss_type);
+    DBG("RSSI : %d\n", it->rssi);
+    DBG("Channel : %d\n", it->channel);
+    DBG("Type : %d\n", it->bss_type);
     
-    DBG("---------------\r\n");
+    DBG("---------------\n");
     
     it++; //Next result
   }
@@ -190,11 +190,11 @@
   ZG_PSK_CALC_RES* res = (ZG_PSK_CALC_RES*) buf;
   if( (res->result != 1) || (res->key_returned != 1) )
   {
-    DBG("\r\nCould not compute key, error %d\r\n", res->result);
+    DBG("Could not compute key, error %d\n", res->result);
     return; //Error
   }
   
-  DBG("\r\nPMK key is :\r\n");
+  DBG("PMK key is :\n");
   hexdump(res->key, ZG_PMK_LEN);
   
   byte key[ZG_PMK_LEN];