Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of C027_Support by
Diff: SerialPipe.h
- Revision:
- 15:5eda64e5b9d1
- Parent:
- 14:69c3e57ef0f5
- Child:
- 16:4a7ba1887e81
diff -r 69c3e57ef0f5 -r 5eda64e5b9d1 SerialPipe.h
--- a/SerialPipe.h	Tue Nov 19 09:02:35 2013 +0000
+++ b/SerialPipe.h	Fri Nov 22 08:23:30 2013 +0000
@@ -3,22 +3,22 @@
 #include "mbed.h"
 #include "Pipe.h"
 
-class SerialPipe : public Serial
+#define _SerialPipeBase SerialBase
+
+class SerialPipe : public _SerialPipeBase
 {
 public:
-    SerialPipe(PinName tx, PinName rx, int rxSize = 128, int txSize = 128, const char* name = NULL);
+    SerialPipe(PinName tx, PinName rx, int rxSize = 128, int txSize = 128);
     virtual ~SerialPipe(void);
     // tx channel
     int writeable(void);
     int putc(int c); // blocking
-    int put(const void* buffer, int length, bool blocking = false);
+    int put(const void* buffer, int length, bool blocking);
     // rx channel
     int readable(void);
     int getc(void); // blocking
-    int get(void* buffer, int length, bool blocking = false);
+    int get(void* buffer, int length, bool blocking);
 protected:
-    virtual int _getc();
-    virtual int _putc(int c);
     void rxIrqBuf(void);
     void txIrqBuf(void);
     void txStart(void);
@@ -33,7 +33,7 @@
 class SerialPipeEx : public SerialPipe
 {
 public:
-    SerialPipeEx(PinName tx, PinName rx, int rxSize = 128, int txSize = 128, const char* name = NULL);
+    SerialPipeEx(PinName tx, PinName rx, int rxSize = 128, int txSize = 128);
     int getLine(char* buffer, int length);
     static int getLine(char* buffer, int length, Pipe<char>* pipe);
 };
    