Buffered Serial Port Driver for RTOS tested with a K64F

Dependents:   JRO_CR2 frdm_test JRO_DDSv2 JRO_DDSv2_rev2019

Fork of SerialDriver by BlazeX .

Revision:
5:ee58295c58e1
Parent:
4:3956012cd0c4
--- a/SerialDriver.h	Thu Feb 05 19:03:30 2015 +0000
+++ b/SerialDriver.h	Tue Feb 10 14:29:32 2015 +0000
@@ -13,6 +13,9 @@
 /// @see https://developer.mbed.org/users/mbed_official/code/mbed-rtos/
 /// @see https://developer.mbed.org/users/mbed_official/code/mbed/
 
+#ifndef        SERIAL_DRIVER
+#define        SERIAL_DRIVER
+
 #pragma once
 
 #include "mbed.h"
@@ -173,7 +176,6 @@
     /// @return true - RX buffer is readable, false - else
     inline bool readable()      {   return !isRxBufferEmpty();   }
     
-    
     /// @brief Returns number of dropped bytes that did not fit into TX buffer
     /// @return number of dropped tx bytes
     inline int getNumTxDrops()  {   return numTxDrops;  }
@@ -182,3 +184,5 @@
     /// @return number of dropped rx bytes
     inline int getNumRxDrops()  {   return numRxDrops;  }
 };
+
+#endif    //  #ifndef  SERIAL_DRIVER
\ No newline at end of file