mbed library sources

Fork of mbed-src by mbed official

Files at this revision

API Documentation at this revision

Comitter:
krbng4180
Date:
Sun Mar 13 21:09:20 2016 +0000
Parent:
635:a11c0372f0ba
Commit message:
IT WORKS;

Changed in this revision

api/Serial.h Show annotated file Show diff for this revision Revisions of this file
api/Stream.h Show annotated file Show diff for this revision Revisions of this file
common/Serial.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r a11c0372f0ba -r acd8185c8960 api/Serial.h
--- a/api/Serial.h	Wed Sep 30 17:00:09 2015 +0100
+++ b/api/Serial.h	Sun Mar 13 21:09:20 2016 +0000
@@ -61,6 +61,9 @@
      *    Either tx or rx may be specified as NC if unused
      */
     Serial(PinName tx, PinName rx, const char *name=NULL);
+    
+    /* Copy contructor */
+    Serial(const Serial& serial);
 
 protected:
     virtual int _getc();
diff -r a11c0372f0ba -r acd8185c8960 api/Stream.h
--- a/api/Stream.h	Wed Sep 30 17:00:09 2015 +0100
+++ b/api/Stream.h	Sun Mar 13 21:09:20 2016 +0000
@@ -29,6 +29,7 @@
 
 public:
     Stream(const char *name=NULL);
+    
     virtual ~Stream();
 
     int putc(int c);
diff -r a11c0372f0ba -r acd8185c8960 common/Serial.cpp
--- a/common/Serial.cpp	Wed Sep 30 17:00:09 2015 +0100
+++ b/common/Serial.cpp	Sun Mar 13 21:09:20 2016 +0000
@@ -23,6 +23,9 @@
 Serial::Serial(PinName tx, PinName rx, const char *name) : SerialBase(tx, rx), Stream(name) {
 }
 
+Serial::Serial(const Serial& serial) : SerialBase(USBTX, USBRX) {
+}
+
 int Serial::_getc() {
     return _base_getc();
 }