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:
- 110:baec959e1915
- Parent:
- 109:644a59ebb5b1
- Child:
- 111:6a3b77c065c0
diff -r 644a59ebb5b1 -r baec959e1915 main.cpp --- a/main.cpp Fri Aug 04 07:30:52 2017 +0000 +++ b/main.cpp Fri Aug 04 10:19:41 2017 +0000 @@ -36,31 +36,31 @@ // 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 #define SERIAL_PORT_MONITOR_NO /* change to SERIAL_PORT_MONITOR_YES for debug messages */ -#ifndef SERIAL_PORT_MONITOR_NO - // here we define the OPTIONAL, second debug serial port for the various target boards // insert your target board's port here if it's not in yet - if it works, please send it to me - thanks!!! +#if !defined(SERIAL_PORT_MONITOR_NO) #if defined(TARGET_LPC1768) Serial xx(p9, p10); // Second serial port on LPC1768 - not required to run, if you get compile error here, change #define SERIAL_PORT_MONITOR_YES to #define SERIAL_PORT_MONITOR_NO -#elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_L152RE) || defined(TARGET_NUCLEO_L053R8) || defined(TARGET_NUCLEO_L476RG) +#elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_L152RE) || defined(TARGET_NUCLEO_L053R8) || defined(TARGET_NUCLEO_L476RG) || defined(TARGET_NUCLEO_F401RE) Serial xx(PC_10, PC_11); // Second serial port on NUCLEO boards - not required to run, if you get compile error here, change #define SERIAL_PORT_MONITOR_YES to #define SERIAL_PORT_MONITOR_NO +#elif defined(TARGET_LPC11U24) +#error The LPC11U24 does not have a second serial port to use for debugging - change SERIAL_PORT_MONITOR_YES back to SERIAL_PORT_MONITOR_NO #else #error Add your target board's second serial port here if you want to use debugging - or choose SERIAL_PORT_MONITOR_NO #endif -#define debug(x...) xx.printf (x) +#define debug(x...) xx.printf (x) /* if we have a serial port we print debug messages */ #else -#define debug(x...) {} +#define debug(x...) {} /* if we don't have a serial port we do nothing */ #endif -// verbosity flag used in debug printouts - change to 1 to see more debug info. Lots of interesting info. +// verbosity flags used in debug printouts - change to 1 to see increasingly more detailed debug info. #define v0 0 -// verbosity flag used in debug printouts - change to 1 to see more debug info. Lots of interesting info. #define v1 0 -// verbosity flag used in debug printouts - change to 1 to see more debug info. Lots of interesting info. #define v2 0 // this is the webpage we serve when we get an HTTP request to root (/) @@ -981,6 +981,7 @@ + int main() { pc.baud(115200); // USB virtual serial port