Demo of the FT810 Based on Code from FTDI modified by Peter Drescher
Fork of FT800_RGB_demo2 by
This code, adapted from Peter Drescher, adapted from FTDI, to use on the FTDI FT810 chip with a nice 800x480 screen. Basically the memory locations have moved since the screen is bigger and so there is more RAM memory before the registers.
Diff: main.cpp
- Revision:
- 2:8800d9144869
- Parent:
- 1:7a29cc1298ef
--- a/main.cpp Wed Feb 24 14:25:12 2016 +0000 +++ b/main.cpp Wed Feb 24 16:40:22 2016 +0000 @@ -96,7 +96,7 @@ TFT.Sleep(5000); // Wait 5 s to show } -// construct the screen and downloasd it to the LCD +// construct the screen and download it to the LCD void screen_1(unsigned int color,unsigned int bright) { TFT.DLstart(); // start a new display command list @@ -126,8 +126,21 @@ TFT.DL(VERTEX2II(249,11,0,0)); TFT.DL(COLOR_RGB(0x0,0xff,0x00)); TFT.DL(VERTEX2II(317,50,0,0)); + TFT.DL(SCISSOR_XY(10,10)); // define sub area starting at 10,10 - TFT.DL(SCISSOR_SIZE(50,50)); // size 50,50 + TFT.DL(SCISSOR_SIZE(50,50)); // size 50,50 + hsv2rgb(color /65536.0 * 360,1.0,bright / 255.0); // calculate rgb color from settings + TFT.DL(CLEAR_COLOR_RGB(r,b,g)); // set filling color to r,g,b + TFT.DL(CLEAR(1,1,1)); // fill the area + + TFT.DL(SCISSOR_XY(500,10)); // define sub area starting at 10,10 + TFT.DL(SCISSOR_SIZE(200,200)); // size 200,200 + hsv2rgb(color /65536.0 * 360,1.0,bright / 255.0); // calculate rgb color from settings + TFT.DL(CLEAR_COLOR_RGB(r,b,g)); // set filling color to r,g,b + TFT.DL(CLEAR(1,1,1)); // fill the area + + TFT.DL(SCISSOR_XY(500,210)); // define sub area starting at 10,10 + TFT.DL(SCISSOR_SIZE(200,200)); // size 200,200 hsv2rgb(color /65536.0 * 360,1.0,bright / 255.0); // calculate rgb color from settings TFT.DL(CLEAR_COLOR_RGB(r,b,g)); // set filling color to r,g,b TFT.DL(CLEAR(1,1,1)); // fill the area