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.
Dependencies: ACM1602NI TextLCD
Dependents: TextLCD_ostream_sample
TextLCD_ostream.cpp@1:e46139d4b8ba, 2016-06-18 (annotated)
- Committer:
- jk1lot
- Date:
- Sat Jun 18 14:20:29 2016 +0000
- Revision:
- 1:e46139d4b8ba
- Parent:
- 0:4ba062d3d524
- Child:
- 3:183bcab4951b
1st published version
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| jk1lot | 0:4ba062d3d524 | 1 | #include "TextLCD_ostream.h" |
| jk1lot | 0:4ba062d3d524 | 2 | |
| jk1lot | 1:e46139d4b8ba | 3 | lcd_streambuf::int_type lcd_streambuf::overflow(lcd_streambuf::int_type c) |
| jk1lot | 0:4ba062d3d524 | 4 | { |
| jk1lot | 1:e46139d4b8ba | 5 | if( c != EOF ) lcd->putc(c); |
| jk1lot | 0:4ba062d3d524 | 6 | return c; |
| jk1lot | 0:4ba062d3d524 | 7 | } |
| jk1lot | 0:4ba062d3d524 | 8 | |
| jk1lot | 1:e46139d4b8ba | 9 | |
| jk1lot | 1:e46139d4b8ba | 10 | lcd_ostream::lcd_ostream(TextLCD_Base *p) : std::ostream(&lcd_buf) |
| jk1lot | 0:4ba062d3d524 | 11 | { |
| jk1lot | 1:e46139d4b8ba | 12 | lcd_buf.setlcd(p); |
| jk1lot | 1:e46139d4b8ba | 13 | lcd=p; |
| jk1lot | 0:4ba062d3d524 | 14 | } |
| jk1lot | 0:4ba062d3d524 | 15 | |
| jk1lot | 0:4ba062d3d524 | 16 | lcd_ostream& lcd_ostream::locate(int column, int row) |
| jk1lot | 0:4ba062d3d524 | 17 | { |
| jk1lot | 1:e46139d4b8ba | 18 | lcd->locate(column,row); |
| jk1lot | 0:4ba062d3d524 | 19 | return *this; |
| jk1lot | 0:4ba062d3d524 | 20 | } |
| jk1lot | 0:4ba062d3d524 | 21 | |
| jk1lot | 0:4ba062d3d524 | 22 | lcd_ostream& lcd_ostream::cls() |
| jk1lot | 0:4ba062d3d524 | 23 | { |
| jk1lot | 1:e46139d4b8ba | 24 | lcd->cls(); |
| jk1lot | 0:4ba062d3d524 | 25 | return *this; |
| jk1lot | 0:4ba062d3d524 | 26 | } |