Stream text on the LCD_DISCO_F746NG TFT screeen.
Dependencies: BSP_DISCO_F746NG
Diff: TftStream.h
- Revision:
- 1:c8b8be3c4741
- Parent:
- 0:ad0cf038ea33
- Child:
- 2:805972c861f4
--- a/TftStream.h Tue Dec 04 14:05:31 2018 +0000 +++ b/TftStream.h Tue Dec 04 14:18:09 2018 +0000 @@ -4,6 +4,55 @@ #include <sstream> #include <queue> +/* + * TFTSTREAM DEMO: + +#include "mbed.h" +#include "TftStream.h" + + +int main() +{ + TftStream tft_out; + LCD_DISCO_F746NG& lcd = tft_out.getLcd(); + + tft_out << "TftStream_demo for DISCOVERY STM32F746NG\n\n"; + wait(1); + + while(1) { + wait(0.5); + for (int i = 0; i < 30; ++i) { + tft_out << i << " slow output\n"; + wait(0.1); + } + wait(0.1); + + for (int i = 0; i < 30; ++i) { + tft_out << i << " fast output\n"; + wait(0.01); + } + wait(0.1); + + for (int i = 0; i < 30; ++i) { + tft_out << i << " very fast output\n"; + } + wait(0.1); + + tft_out << "\n\nsome\n\nnewlines\n"; + wait(0.5); + tft_out << "this is a looooooooooooooooooooooooooooooooooooooooong text\n"; + wait(0.5); + + tft_out << "HAVE FUN !!!\n"; + wait(1); + + tft_out.clear(); + tft_out.resetFont(); + wait(2); + } +} + */ + //Serial pc(SERIAL_TX, SERIAL_RX); // DEBUG