My take on a demo for the Freescale FRDM KL25Z board showing off it's main features all at once together with USB CDC serial.

Dependencies:   FRDM_MMA8451Q TSI USBDevice mbed

Revision:
5:55ef207399fb
Parent:
4:85ecc94a7643
diff -r 85ecc94a7643 -r 55ef207399fb main.cpp
--- a/main.cpp	Thu Nov 21 06:49:25 2013 +0000
+++ b/main.cpp	Tue Jan 07 09:36:19 2014 +0000
@@ -17,20 +17,31 @@
 
 #define MMA8451_I2C_ADDRESS (0x1d<<1)
 
-// Freescale Freedom KL25Z board has an RGB LED on it.
+/// Freescale Freedom KL25Z board has an RGB LED on it.
 DigitalOut ledRed(LED_RED);
 DigitalOut ledGreen(LED_GREEN);
 DigitalOut ledBlue(LED_BLUE);
 
-// Setup the serial over USB virtual COM port.
-//Serial pc(USBTX,USBRX);
+/** Setup the serial over USB virtual COM port.
+ * Note that the connection is made over the application USB port, NOT the CMSIS-DAP USB port.
+ * If you would like to use the debug/programmer USB port instead, the the following code:
+ *
+ * @code
+ * Serial pc(USBTX,USBRX); 
+ * @endcode
+ *
+ * Notice that the default mbed USB CDC device will block on this declaration until you attach the KL25Z board
+ * to your PC's USB port and the device enumerates. After that, program execution will begin.
+ */
 USBSerial pc;
 
 int main()
 {
     char c;
     int i=0;
+    /// Capacitive touch sensor, defined as tsi.
     TSISensor tsi;
+    /// 3-axis MEMS accelerometer.
     MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS);
 
     pc.printf("\nHello World!\n");