RealtimeCompLab2

Dependencies:   mbed

Fork of PPP-Blinky by Nicolas Nackel

Revision:
51:a86d56844324
Parent:
50:ad4e7c3c88e5
Child:
54:13f83621db80
--- a/main.cpp	Sun Jan 29 00:58:03 2017 +0000
+++ b/main.cpp	Sun Jan 29 02:29:46 2017 +0000
@@ -34,11 +34,10 @@
 Serial xx(PC_10, PC_11); // Not necessary to run - if you have a compile error here change line 31 to SERIAL_PORT_MONITOR_NO
 #define debug(x...) xx.printf (x)
 #else
-// no debug monitoring
 #define debug(x...) {}
 #endif
 
-Serial pc(USBTX, USBRX); // The serial port on your mbed hardware. Your PC thinks this is a dial-up modem.
+Serial pc(USBTX, USBRX); // The serial port on your mbed hardware. Your PC thinks this serial port is a dial-up modem.
 
 int v0=1;
 int v1=1; // verbosity flags used in debug printouts - change to 1/0 to see more/less debug info
@@ -859,8 +858,7 @@
                 ppp.hdlc.frameBusy=0; // done gathering frame
                 if (ppp.rx.tail == 0) { // did we just wrap around?
                     ppp.hdlc.frameEndIndex=BUFLEN-1; // wrap back to end of buffer
-                }
-                else {
+                } else {
                     ppp.hdlc.frameEndIndex=ppp.rx.tail-1; // remember where frame ends
                 }
                 processHDLCFrame(ppp.hdlc.frameStartIndex, ppp.hdlc.frameEndIndex);
@@ -897,7 +895,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 command from windows dial up networking
         wait_for_HDLC_frame();
     }
 }