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

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Stream.h

Committer:
simon.ford@mbed.co.uk
Date:
2008-04-30
Revision:
1:6b7f447ca868
Parent:
0:82220227f4fa
Child:
4:5d1359a283bc

File content as of revision 1:6b7f447ca868:

/* mbed Microcontroller Library - Stream
 * Copyright (c) 2007-2008, sford
 */

#ifndef MBED_STREAM_H
#define MBED_STREAM_H

#include "Base.h"

namespace mbed {

class Stream : public Base {

public:

	Stream();

	int putc(int c);
	int getc();
    int printf(const char* format, ...);
    int scanf(const char* format, ...);

	int _backspace();
	
protected:

	virtual int _putc(int c) = 0;
	virtual int _getc() = 0;

	int _back;
	int _last;
	
};

} // namespace mbed

#endif