RealtimeCompLab2

Dependencies:   mbed

Fork of PPP-Blinky by Nicolas Nackel

Revision:
52:accc3026b2b0
Parent:
50:ad4e7c3c88e5
Child:
53:3a8a37fda757
--- a/main.cpp	Sun Jan 29 00:58:03 2017 +0000
+++ b/main.cpp	Sun Jan 29 21:20:20 2017 +0000
@@ -51,7 +51,7 @@
 // the serial port receive buffer and packet buffer
 #define BUFLEN (1<<12)
 char rxbufppp[BUFLEN]; // BUFLEN must be a power of two because we use & operator for fast wrap-around in rxHandler
-char frbuf[2000]; // send/receive buffer for ppp frames
+char hdlcBuffer[2000]; // send/receive buffer for hdlc frames
 
 // a structure to keep all our ppp globals in
 
@@ -88,7 +88,7 @@
     ppp.rx.buf=rxbufppp;
     ppp.rx.tail=0;
     ppp.rx.head=0;
-    ppp.pkt.buf=frbuf;
+    ppp.pkt.buf=hdlcBuffer;
     ppp.pkt.len=0;
     ppp.ident=0;
     ppp.seq=1000;
@@ -897,7 +897,7 @@
     pppInitStruct(); // initialize all the PPP properties
     pc.attach(&rxHandler,Serial::RxIrq); // start the receive handler
     while(1) {
-        if ( ppp.online==0 ) scanForConnectString(); // respond to connect string from PC
+        scanForConnectString(); // respond to connect string from PC
         wait_for_HDLC_frame();
     }
 }