mbed libraries for KL25Z

Dependents:   FRDM_RGBLED

Revision:
8:c14af7958ef5
Parent:
7:73c5efe92a6c
Child:
9:663789d7729f
--- a/Stream.h	Tue Oct 23 09:20:18 2012 +0000
+++ b/Stream.h	Fri Nov 09 11:33:53 2012 +0000
@@ -1,50 +1,30 @@
 /* mbed Microcontroller Library - Stream
  * Copyright (c) 2007-2009 ARM Limited. All rights reserved.
- */ 
- 
+ */
 #ifndef MBED_STREAM_H
 #define MBED_STREAM_H
 
-#include "FileLike.h"
 #include "platform.h"
-#include <cstdio>
+#include "FileHandle.h"
 
 namespace mbed {
 
-class Stream : public FileLike {
+class Stream : public FileHandle {
 
 public:
-    
-    Stream(const char *name = NULL);
+    Stream(void);
     virtual ~Stream();
 
-    int putc(int c) {
-        fflush(_file);
-        return std::fputc(c, _file); 
-    }
-    int puts(const char *s) {
-        fflush(_file);
-        return std::fputs(s, _file); 
-    }
-    int getc() {
-        fflush(_file);
-        return std::fgetc(_file);
-    }
-    char *gets(char *s, int size) {
-        fflush(_file);
-        return std::fgets(s,size,_file);
-    }
+    int putc(int c);
+    int puts(const char *s);
+    int getc();
+    char *gets(char *s, int size);
     int printf(const char* format, ...);
     int scanf(const char* format, ...);
     
-    operator std::FILE*() { return _file; }
-
-#ifdef MBED_RPC
-    virtual const struct rpc_method *get_rpc_methods();
-#endif
+    operator std::FILE*() {return _file;}
 
 protected:
-
     virtual int close();
     virtual ssize_t write(const void* buffer, size_t length);
     virtual ssize_t read(void* buffer, size_t length);
@@ -57,10 +37,8 @@
     virtual int _getc() = 0;
     
     std::FILE *_file;
-    
 };
 
 } // namespace mbed
 
 #endif
-