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:
- 130:45ee0d648a72
- Parent:
- 129:b8a0b0e8cff1
- Child:
- 131:134b6d0c11e9
diff -r b8a0b0e8cff1 -r 45ee0d648a72 main.cpp --- 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();