808
Dependents: Chromatograph_Mobile
Diff: src/FT_GPU_Hal.cpp
- Revision:
- 11:2f11d40f0f9a
- Parent:
- 10:6a81aeca25e3
- Child:
- 12:f0980f7a75ae
diff -r 6a81aeca25e3 -r 2f11d40f0f9a src/FT_GPU_Hal.cpp --- 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 */