mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

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

Revision:
212:34d62c0b2af6
Parent:
192:42b1a45e48aa
Child:
525:c320967f86b9
--- a/common/SerialBase.cpp	Sun May 25 08:00:07 2014 +0100
+++ b/common/SerialBase.cpp	Mon May 26 18:15:07 2014 +0100
@@ -20,9 +20,8 @@
 
 namespace mbed {
 
-SerialBase::SerialBase(PinName tx, PinName rx) {
+SerialBase::SerialBase(PinName tx, PinName rx) : _serial(), _baud(9600) {
     serial_init(&_serial, tx, rx);
-    _baud = 9600;
     serial_irq_handler(&_serial, SerialBase::_irq_handler, (uint32_t)this);
 }
 
@@ -71,7 +70,7 @@
   // Wait for 1.5 frames before clearing the break condition
   // This will have different effects on our platforms, but should
   // ensure that we keep the break active for at least one frame.
-  // We consider a full frame (1 start bit + 8 data bits bits + 
+  // We consider a full frame (1 start bit + 8 data bits bits +
   // 1 parity bit + 2 stop bits = 12 bits) for computation.
   // One bit time (in us) = 1000000/_baud
   // Twelve bits: 12000000/baud delay
@@ -88,16 +87,16 @@
         case RTS:
             serial_set_flow_control(&_serial, flow_type, flow1, NC);
             break;
-            
+
         case CTS:
             serial_set_flow_control(&_serial, flow_type, NC, flow1);
             break;
-            
+
         case RTSCTS:
         case Disabled:
             serial_set_flow_control(&_serial, flow_type, flow1, flow2);
             break;
-            
+
         default:
             break;
     }