// R196GRK-0xx-ATC-InitialCode// // Truly1.952" 410x502 AMOLED + CO5300 QSPI// // 2024.03.14 Gamma 2.2// SPI_CS=0;SPI_WriteComm(0xFE);SPI_WriteData(0x00);SPI_CS=1; SPI_CS=0;SPI_WriteComm(0xC4);SPI_WriteData(0x80);SPI_CS=1; SPI_CS=0;SPI_WriteComm(0x3A);SPI_WriteData(0x55);SPI_CS=1; SPI_CS=0;SPI_WriteComm(0x35);SPI_WriteData(0x00);SPI_CS=1; SPI_CS=0;SPI_WriteComm(0x53);SPI_WriteData(0x20);SPI_CS=1; SPI_CS=0;SPI_WriteComm(0x51);SPI_WriteData(0xFF);SPI_CS=1; //0X00 SPI_CS=0;SPI_WriteComm(0x63);SPI_WriteData(0xFF);SPI_CS=1; SPI_CS=0;SPI_WriteComm(0x2A);SPI_WriteData(0x00);SPI_WriteData(0x16);SPI_WriteData(0x01);SPI_WriteData(0xAF);SPI_CS=1; SPI_CS=0;SPI_WriteComm(0x2B);SPI_WriteData(0x00);SPI_WriteData(0x00);SPI_WriteData(0x01);SPI_WriteData(0xF5);SPI_CS=1; SPI_CS=0;SPI_WriteComm(0x11);SPI_CS=1; Delay(60); SPI_CS=0;SPI_WriteComm(0x29);SPI_CS=1; Delay(60); //此函数用于设置“窗口”---GRAM void DM_block_write(unsigned int Xstart,unsigned int Xend,unsigned int Ystart,unsigned int Yend) { SPI_CS=0; SPI_WriteComm(0x2a); SPI_WriteData(Xstart+22>>8); SPI_WriteData(Xstart+22&0xff); SPI_WriteData(Xend+22>>8); SPI_WriteData(Xend+22&0xff); SPI_CS=1; SPI_CS=0; SPI_WriteComm(0x2b); SPI_WriteData(Ystart>>8); SPI_WriteData(Ystart&0xff); SPI_WriteData(Yend>>8); SPI_WriteData(Yend&0xff); SPI_CS=1; SPI_CS=0; SPI_WriteComm(0x2c); SPI_CS=1; }