Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of PPP-Blinky by
Revision 51:a86d56844324, committed 2017-01-29
- Comitter:
- nixnax
- Date:
- Sun Jan 29 02:29:46 2017 +0000
- Parent:
- 50:ad4e7c3c88e5
- Child:
- 54:13f83621db80
- Commit message:
- Successful Test of 1 Million Pings
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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();
}
}
