Versão limpa em 04/09/2014. Telnet funcionando.

Dependencies:   EthernetInterface mbed-rtos mbed NTPClient

Revision:
1:fe2d4530da1b
Parent:
0:66d8bd1f9d4c
Child:
29:fcfcb31a6362
--- a/Codes/Capture.cpp	Thu Sep 04 19:40:18 2014 +0000
+++ b/Codes/Capture.cpp	Fri Sep 12 13:08:14 2014 +0000
@@ -13,7 +13,7 @@
 
 __attribute((section("AHBSRAM1"),aligned)) dmaLinkedListNode Capture::m_Nodes[2];// __attribute__((section("AHBSRAM0"))); //this list holds the buffer configuration for the DMA peripheral
 __attribute((section("AHBSRAM1"),aligned)) unsigned short int Capture::m_AdcBuffers[2][NUMBER_OF_SAMPLES][NUMBER_OF_CHANNELS];// __attribute__((section("AHBSRAM0")));
-//Serial rfid_serial(p28,p27);
+Serial rfid_serial(p28,p27);
 
 //This function prepares the capture buffers and starts the DMA peripheral
 void Capture::Start()
@@ -89,9 +89,9 @@
     LPC_GPDMA->DMACIntTCClear = 0xFF;
 }
 
-void Capture::ReadRFID(int channel,char *rfid)
+bool Capture::ReadRFID(int channel,char *rfid)
 {
-    /*
+    
     char cmd[4];
     cmd[0] = 'S';
     cmd[1] = '0'+channel;
@@ -118,8 +118,12 @@
             wait_ms(1);
         
     }
-    ans[cnt-1] = '\0';
-    for(int i=0;i<8;i++)
-        rfid[i] = ans[i];
-    */
+    if (cnt > 0){
+        ans[cnt-1] = '\0';
+        for(int i=0;i<10;i++)
+            rfid[i] = ans[i];
+        return true;
+    }
+    return false;
+    
 }
\ No newline at end of file