RealtimeCompLab2

Dependencies:   mbed

Fork of PPP-Blinky by Nicolas Nackel

Committer:
nixnax
Date:
Wed Sep 06 14:27:04 2017 +0000
Revision:
174:e5a3f16421a5
Parent:
153:7993def8663f
Child:
177:dab9e685af53
sendUdpData()

Who changed what in which revision?

UserRevisionLine numberNew 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 147:0f40005cbc5f 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 153:7993def8663f 11 waitForPcConnectString(); // wait for PC to send a connect message
nixnax 150:3366bf3d294e 12 while( connectedPpp() ) {
nixnax 142:54d1543e23e5 13 waitForPppFrame(); // process PPP frames until we receive a disconnect command
nixnax 174:e5a3f16421a5 14 sendUdpData(); // send a udp data packet
nixnax 81:9ede60e9a2c8 15 }
nixnax 142:54d1543e23e5 16 }
nixnax 105:45001195b325 17 }