David Smart
/
PUB_RA8875_TouchColors
An example program using the RA8875 Display controller with the touch-screen option.
Diff: main.cpp
- Revision:
- 6:813c99fda5da
- Parent:
- 4:daf56708ae86
- Child:
- 7:5194e00baf6f
--- a/main.cpp Mon Mar 04 12:17:10 2019 +0000 +++ b/main.cpp Sun Jul 28 03:44:00 2019 +0000 @@ -7,10 +7,10 @@ const char * BUILD_DATE = __DATE__ " " __TIME__; // Define this for 800x480 panel, undefine for 480x272 -//#define BIG_SCREEN +#define BIG_SCREEN // Define this for Cap touch panel, undefine for resistive -//#define CAP_TOUCH +#define CAP_TOUCH #ifdef CAP_TOUCH RA8875 lcd(p5, p6, p7, p12, NC, p9,p10,p13, "tft"); // SPI:{MOSI,MISO,SCK,/ChipSelect,/reset}, I2C:{SDA,SCL,/IRQ}, name @@ -154,12 +154,12 @@ // +----------------------------------------------------+ y = 271 // 10 w-10 rect_t RGBList[] = { - { 10,100, LCD_W-10,139 }, // R - { 10,150, LCD_W-10,189 }, // G - { 10,200, LCD_W-10,239 }, // B - { 10, 50, LCD_W-10, 89 } // This for the Sample + rect_t( 10,100, LCD_W-10,139 ), // R + rect_t( 10,150, LCD_W-10,189 ), // G + rect_t( 10,200, LCD_W-10,239 ), // B + rect_t( 10, 50, LCD_W-10, 89 ) // This for the Sample }; - rect_t PrintScreenRect = { LCD_W/2-30, 5, LCD_W/2+30, 40}; + rect_t PrintScreenRect = rect_t( LCD_W/2-30, 5, LCD_W/2+30, 40 ); lcd.fillrect(RGBList[0], Red); lcd.fillrect(RGBList[1], Green); lcd.fillrect(RGBList[2], Blue);