Lab2_web / Mbed 2 deprecated webserverBlinky

Dependencies:   mbed

Fork of webserverBlinky by RealTimeCompLab2

Files at this revision

API Documentation at this revision

Comitter:
nixnax
Date:
Mon Aug 14 04:40:02 2017 +0000
Parent:
129:b8a0b0e8cff1
Child:
131:134b6d0c11e9
Commit message:
Imported Sam Grove's BufferedSerial library. Eliminated all FCS errors due to dropped characters.

Changed in this revision

BufferedSerial.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BufferedSerial.lib	Mon Aug 14 04:40:02 2017 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/sam_grove/code/BufferedSerial/#a0d37088b405
--- a/main.cpp	Sun Aug 13 11:27:25 2017 +0000
+++ b/main.cpp	Mon Aug 14 04:40:02 2017 +0000
@@ -38,7 +38,8 @@
 
 #include "mbed.h"
 #include "sha1.h"
-
+#include "BufferedSerial.h"
+ 
 // The #define below enables/disables a second (OPTIONAL) serial port that prints out interesting diagnostic messages.
 // Change to SERIAL_PORT_MONITOR_YES to enable diagnostics messages. You need to wire a second serial port to your mbed hardware to monitor this.
 // Note - the LPC11U24 does NOT have a second serial port
@@ -103,7 +104,7 @@
 // The modem baud rate should be set to 115200 baud
 // See instructions at the top.
 // On a typical mbed hardware platform this serial port is a USB virtual com port (VCP) and the USB serial driver is supplied by the board vendor.
-Serial pc(USBTX, USBRX); // usb virtual com port for mbed hardware
+BufferedSerial pc(USBTX, USBRX, 500); // usb virtual com port for mbed hardware
 
 DigitalOut led1(LED1); // this led toggles when a packet is received
 
@@ -300,6 +301,7 @@
         void determinePacketType(); // declaration only
         determinePacketType();
     } else {
+#define REPORT_FCS_ERROR_YES
 #ifdef REPORT_FCS_ERROR_YES
         char pbuf[50]; // local print buffer
         fillbuf();