Lab 1 Program C
Fork of mbed by
Stream.h@0:82220227f4fa, 2008-04-08 (annotated)
- Committer:
- simon.ford@mbed.co.uk
- Date:
- Tue Apr 08 14:12:21 2008 +0000
- Revision:
- 0:82220227f4fa
- Child:
- 1:6b7f447ca868
A first develoment release of the mbed libraries
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
simon.ford@mbed.co.uk | 0:82220227f4fa | 1 | /* mbed Microcontroller Library - Stream |
simon.ford@mbed.co.uk | 0:82220227f4fa | 2 | * Copyright (c) 2007-2008, sford |
simon.ford@mbed.co.uk | 0:82220227f4fa | 3 | */ |
simon.ford@mbed.co.uk | 0:82220227f4fa | 4 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 5 | #ifndef MBED_STREAM_H |
simon.ford@mbed.co.uk | 0:82220227f4fa | 6 | #define MBED_STREAM_H |
simon.ford@mbed.co.uk | 0:82220227f4fa | 7 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 8 | #include "Base.h" |
simon.ford@mbed.co.uk | 0:82220227f4fa | 9 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 10 | namespace mbed { |
simon.ford@mbed.co.uk | 0:82220227f4fa | 11 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 12 | class Stream : public Base { |
simon.ford@mbed.co.uk | 0:82220227f4fa | 13 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 14 | public: |
simon.ford@mbed.co.uk | 0:82220227f4fa | 15 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 16 | Stream(); |
simon.ford@mbed.co.uk | 0:82220227f4fa | 17 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 18 | int putc(int c); |
simon.ford@mbed.co.uk | 0:82220227f4fa | 19 | int getc(); |
simon.ford@mbed.co.uk | 0:82220227f4fa | 20 | int printf(const char* format, ...); |
simon.ford@mbed.co.uk | 0:82220227f4fa | 21 | int scanf(const char* format, ...); |
simon.ford@mbed.co.uk | 0:82220227f4fa | 22 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 23 | int _backspace(); |
simon.ford@mbed.co.uk | 0:82220227f4fa | 24 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 25 | protected: |
simon.ford@mbed.co.uk | 0:82220227f4fa | 26 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 27 | virtual int _putc(int c) = 0; |
simon.ford@mbed.co.uk | 0:82220227f4fa | 28 | virtual int _getc() = 0; |
simon.ford@mbed.co.uk | 0:82220227f4fa | 29 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 30 | int _back; |
simon.ford@mbed.co.uk | 0:82220227f4fa | 31 | int _last; |
simon.ford@mbed.co.uk | 0:82220227f4fa | 32 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 33 | }; |
simon.ford@mbed.co.uk | 0:82220227f4fa | 34 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 35 | } // namespace mbed |
simon.ford@mbed.co.uk | 0:82220227f4fa | 36 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 37 | #endif |