The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Revision:
171:3a7713b1edbc
Parent:
170:e95d10626187
Child:
172:65be27845400
--- a/drivers/Serial.h	Thu Sep 06 13:39:34 2018 +0100
+++ b/drivers/Serial.h	Thu Nov 08 11:45:42 2018 +0000
@@ -20,10 +20,10 @@
 
 #if defined (DEVICE_SERIAL) || defined(DOXYGEN_ONLY)
 
-#include "Stream.h"
+#include "platform/Stream.h"
 #include "SerialBase.h"
-#include "PlatformMutex.h"
-#include "serial_api.h"
+#include "platform/PlatformMutex.h"
+#include "hal/serial_api.h"
 #include "platform/NonCopyable.h"
 
 namespace mbed {
@@ -63,10 +63,10 @@
      *  @param tx Transmit pin
      *  @param rx Receive pin
      *  @param name The name of the stream associated with this serial port (optional)
-     *  @param baud The baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE)
+     *  @param baud The baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE or 9600)
      *
      *  @note
-     *    Either tx or rx may be specified as NC if unused
+     *    Either tx or rx may be specified as NC (Not Connected) if unused
      */
     Serial(PinName tx, PinName rx, const char *name = NULL, int baud = MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE);
 
@@ -78,7 +78,7 @@
      *  @param baud The baud rate of the serial port
      *
      *  @note
-     *    Either tx or rx may be specified as NC if unused
+     *    Either tx or rx may be specified as NC (Not Connected) if unused
      */
     Serial(PinName tx, PinName rx, int baud);
 
@@ -99,6 +99,7 @@
         return SerialBase::writeable();
     }
 
+#if !(DOXYGEN_ONLY)
 protected:
     virtual int _getc();
     virtual int _putc(int c);
@@ -106,6 +107,7 @@
     virtual void unlock();
 
     PlatformMutex _mutex;
+#endif
 };
 
 } // namespace mbed