Using std::ostream with TextLCD

Dependencies:   ACM1602NI TextLCD

Dependents:   TextLCD_ostream_sample

This is class library inherited std::ostream for TextLCD
Because a large amount of memory is needed, do not work in low memory MPU

Sample program is here. And notebook page is here (sorry notebook page is only in Japanese)

Committer:
jk1lot
Date:
Sun Jun 26 08:32:25 2016 +0000
Revision:
4:3a1291526e04
Parent:
3:183bcab4951b
add lcd(); add library TextLCD

Who changed what in which revision?

UserRevisionLine numberNew 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 0:4ba062d3d524 9 lcd_ostream& lcd_ostream::locate(int column, int row)
jk1lot 0:4ba062d3d524 10 {
jk1lot 4:3a1291526e04 11 lcdp->locate(column,row);
jk1lot 0:4ba062d3d524 12 return *this;
jk1lot 0:4ba062d3d524 13 }
jk1lot 0:4ba062d3d524 14
jk1lot 0:4ba062d3d524 15 lcd_ostream& lcd_ostream::cls()
jk1lot 0:4ba062d3d524 16 {
jk1lot 4:3a1291526e04 17 lcdp->cls();
jk1lot 0:4ba062d3d524 18 return *this;
jk1lot 0:4ba062d3d524 19 }