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
main.cpp@144:01d98cf7738e, 2017-08-29 (annotated)
- Committer:
- nixnax
- Date:
- Tue Aug 29 18:42:20 2017 +0000
- Revision:
- 144:01d98cf7738e
- Parent:
- 142:54d1543e23e5
- Child:
- 147:0f40005cbc5f
If UDP message starts with "echo" send it back.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nixnax | 142:54d1543e23e5 | 1 | /** @file ppp-blinky.cpp */ |
nixnax | 81:9ede60e9a2c8 | 2 | #include "mbed.h" |
nixnax | 142:54d1543e23e5 | 3 | #include "ppp-blinky.h" |
nixnax | 9:0992486d4a30 | 4 | |
nixnax | 142:54d1543e23e5 | 5 | // PPP-Blinky - "The Most Basic Internet Of a Thing" |
nixnax | 81:9ede60e9a2c8 | 6 | |
nixnax | 0:2cf4880c312a | 7 | int main() |
nixnax | 0:2cf4880c312a | 8 | { |
nixnax | 144:01d98cf7738e | 9 | initializePpp(); // initialize the serial port(s) and structures |
nixnax | 0:2cf4880c312a | 10 | while(1) { |
nixnax | 142:54d1543e23e5 | 11 | scanForConnectString(); // wait for PC to send a connect message |
nixnax | 142:54d1543e23e5 | 12 | while( connected() ) { |
nixnax | 142:54d1543e23e5 | 13 | waitForPppFrame(); // process PPP frames until we receive a disconnect command |
nixnax | 81:9ede60e9a2c8 | 14 | } |
nixnax | 142:54d1543e23e5 | 15 | } |
nixnax | 105:45001195b325 | 16 | } |