Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 11:2f11d40f0f9a, committed 2020-06-18
- Comitter:
- vitlog
- Date:
- Thu Jun 18 13:14:32 2020 +0000
- Parent:
- 10:6a81aeca25e3
- Commit message:
- Riverdi 70
Changed in this revision
inc/FT_LCD_Type.h | Show annotated file Show diff for this revision Revisions of this file |
src/FT_GPU_Hal.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/inc/FT_LCD_Type.h Mon Jul 23 12:22:23 2018 +0000 +++ b/inc/FT_LCD_Type.h Thu Jun 18 13:14:32 2020 +0000 @@ -16,10 +16,11 @@ //#define EVE2_43G (1) // 480x272 //#define ME812A_WH50R (1) // 800x480 //#define ME812AU_WH50R (1) // 800x480 -#define ME813A_WH50C (1) // 800x480 +//#define ME813A_WH50C (1) // 800x480 //#define ME813AU_WH50C (1) // 800x480 //#define ME810A_WH70R (1) //#define ME811A_WH70C (1) +#define EVE_RVT70 (1) //800x480 #define SAMAPP_ENABLE_APIS_SET0 #define SAMAPP_ENABLE_APIS_SET1 @@ -154,6 +155,27 @@ #define my_DispPCLKPol FT_DISPLAY_PCLKPOL_WVGA_800x480 #endif +/* RVT70xQFxxxxx 800x480 7.0" Riverdi, various options, FT812/FT813, tested with RVT70UQFNWC0x */ +#if defined (EVE_RVT70) +#define my_DispWidth (800L) /* Thd Length of visible part of line (in PCLKs) - display width */ +#define my_DispHeight (480L) /* Tvd Number of visible lines (in lines) - display height */ + +#define my_DispVSync0 (0L) /* Tvf Vertical Front Porch */ +#define my_DispVSync1 (10L) /* Tvf + Tvp Vertical Front Porch plus Vsync Pulse width */ +#define my_DispVOffset (23L) /* Tvf + Tvp + Tvb Number of non-visible lines (in lines) */ +#define my_DispVCycle (525L) /* Tv Total number of lines (visible and non-visible) (in lines) */ +#define my_DispHSync0 (0L) /* Thf Horizontal Front Porch */ +#define my_DispHSync1 (10L) /* Thf + Thp Horizontal Front Porch plus Hsync Pulse width */ +#define my_DispHOffset (46L) /* Thf + Thp + Thb Length of non-visible part of line (in PCLK cycles) */ +#define my_DispHCycle (1056L) /* Th Total length of line (visible and non-visible) (in PCLKs) */ +#define my_DispPCLKPol (1L) /* PCLK polarity (0 = rising edge, 1 = falling edge) */ +#define my_DispSwizzle (0L) /* Defines the arrangement of the RGB pins of the FT800 */ +#define my_DispPCLK (2L) /* 60MHz / REG_PCLK = PCLK frequency 30 MHz */ +#define my_DispCSPREAD (1L) /* helps with noise, when set to 1 fewer signals are changed simultaneously, reset-default: 1 */ +#define EVE_TOUCH_RZTHRESH (1800L) /* touch-sensitivity */ +#define FT81X_ENABLE +#endif + /* the GLYN display has inverted backlite */ //#define Inv_Backlite
--- a/src/FT_GPU_Hal.cpp Mon Jul 23 12:22:23 2018 +0000 +++ b/src/FT_GPU_Hal.cpp Thu Jun 18 13:14:32 2020 +0000 @@ -10,7 +10,7 @@ #include "mbed.h" #include "FT_LCD_Type.h" //Serial pc(USBTX, USBRX); - +//Serial pc(SERIAL_TX,SERIAL_RX,115200); #define SPI_SPEED_START 10000000 #define SPI_SPEED_AFTER 27000000 @@ -40,7 +40,7 @@ ft_bool_t FT813::Bootup(void) { -// terminal.printf("Bootup() entered\r\n"); + //pc.printf("Bootup() entered\r\n");//temp Open(); BootupConfig(); @@ -60,7 +60,7 @@ // Sleep(30); /* Set the clk to external clock */ - HostCommand(FT_GPU_EXTERNAL_OSC); + HostCommand(FT_GPU_INTERNAL_OSC); Sleep(10); /* Access address 0 to wake up the FT813 */ @@ -76,11 +76,11 @@ Sleep(500); //Read Register ID to check if FT813 is ready. chipid = Rd8(REG_ID); -// chipid = Rd8(0x0C0000); -// printf("ID1: 0x%08X\n", chipid); - while(chipid != 0x7C) -// wait(1); -// printf("ID2: 0x%08X\n", chipid); + //chipid = Rd8(0x0C0000); + //pc.printf("ID1: 0x%08X\n", chipid);//temp + while(chipid != 0x7C) //раскомментить как заработает + wait(1);//tmp + //printf("ID2: 0x%08X\n", chipid);//tmp // Speed up // _spi.frequency(50000000); // 30 Mhz SPI clock DC @@ -111,7 +111,7 @@ Wr8(REG_SWIZZLE, DispSwizzle); DispPCLKPol = my_DispPCLKPol; Wr8(REG_PCLK_POL, DispPCLKPol); - Wr8(REG_CSPREAD, 0); + Wr8(REG_CSPREAD, 1); //поменяно для Riverdi 0 на 1 DispPCLK = my_DispPCLK; Wr8(REG_PCLK, DispPCLK); // After this display is visible on the LCD @@ -133,7 +133,7 @@ /* Touch configuration - configure the resistance value to 1200 */ /* This value is specific to customer requirement and derived by experiment */ // Wr16(REG_TOUCH_RZTHRESH,2400); - Wr16(REG_TOUCH_RZTHRESH, 0xFFFF); + Wr16(REG_TOUCH_RZTHRESH, 1800); //поменяно с 0xFFFF на 1800 } /* API to initialize the SPI interface */