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 webserverBlinky by
Diff: main.cpp
- Revision:
- 3:bcc66de0bdcd
- Parent:
- 2:b6ccdc962742
- Child:
- 4:a469050d5b80
diff -r b6ccdc962742 -r bcc66de0bdcd main.cpp --- a/main.cpp Tue Dec 27 17:46:27 2016 +0000 +++ b/main.cpp Tue Dec 27 18:38:49 2016 +0000 @@ -44,7 +44,6 @@ { pc.baud(115200); pc.attach(&rxHandler,Serial::RxIrq); // activate the receive interrupt handler - int waitingForPpp = 1; // client string not found yet int flagCount=0; while(1) { while ( pc_readable() ) { @@ -53,8 +52,7 @@ char * clientFound = strstr( rxbuf, "CLIENTCLIENT" ); // look for string if( clientFound ) { strcpy( clientFound, "FOUND!FOUND!" ); // overwrite found string - if (waitingForPpp) pc.printf("CLIENTSERVER"); // respond to PC - waitingForPpp = waitingForPpp ? 0 : 1; // TOGGLE waiting flag + pc.printf("CLIENTSERVER"); // respond to PC } if ( flagCount>0 ) myled = ((flagCount/2)%2); // toggle on PPP frame found }