
TFT
Dependencies: mbed TFT_fonts SPI_TFT_ILI9341
Revision 0:b253876e3647, committed 2020-09-11
- Comitter:
- zhguowen
- Date:
- Fri Sep 11 05:09:23 2020 +0000
- Commit message:
- TFT
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SPI_TFT_ILI9341.lib Fri Sep 11 05:09:23 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/dreschpe/code/SPI_TFT_ILI9341/#b2b3e5430f81
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TFT-01.cpp Fri Sep 11 05:09:23 2020 +0000 @@ -0,0 +1,36 @@ +#include "stdio.h" +#include "mbed.h" +#include "SPI_TFT_ILI9341.h" +#include "string.h" +#include "Arial12x12.h" +#include "Arial24x23.h" +#include "Arial28x28.h" +#include "font_big.h" + + +extern unsigned char p1[]; //the mbed log +DigitalOut LCD_LED(PB_2); + +SPI_TFT_ILI9341 TFT(PB_15, PB_14, PB_13, PC_10, PC_5, PC_8, "TFT"); +// mosi,miso,sclk,cs, reset, dc + + +int main() +{ + int i; + LCD_LED=1; //backlight on + TFT.claim(stdout); //send stdout to the TFT display + TFT.claim(stderr); //send stderr to the TFT display + + //simple text + + TFT.set_orientation(2); + TFT.foreground(White); + TFT.background(Black); + TFT.cls(); + TFT.set_font((unsigned char*) Arial28x28); //Arial24*23 + TFT.locate(0,0); + TFT.printf("Test Text"); +} + + \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TFT_fonts.lib Fri Sep 11 05:09:23 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/dreschpe/code/TFT_fonts/#76774250fcec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Sep 11 05:09:23 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file