Ejemplo n.º 1
0
void Set_Lcd_Tft_16Bit_240320_Dvs(void)
{
   // int i,j;//,k;
	
	Uart_Printf("[Set LCD]\n");
	
    Lcd_Port_Init();
    Lcd_Init(MODE_TFT_16BIT_240320);
    Glib_Init(MODE_TFT_16BIT_240320);
	Lcd_Lcc3600Enable(); // Enable LCC3600
    Lcd_PowerEnable(0, 1);
    Lcd_EnvidOnOff(1);
    
    Glib_ClearScr(0, MODE_TFT_16BIT_240320);
    Glib_FilledRectangle(0,0,119,159,0xf800);
    Glib_FilledRectangle(120,0,239,159,0x07e0);
    Glib_FilledRectangle(0,160,119,320,0x001f);
    Glib_FilledRectangle(120,160,239,320,0xffff);
    Glib_FilledRectangle(100,100,150,200,0x5555);

    rLCDCON1 &= ~(0x1);	// ENVID off.
	rLCDCON1 = (rLCDCON1 & ~(0x3ff<<8)) | (9<<8) | 1;	// ENVID on. 5MHz 60fps

	// ON PWREN signal
	rLCDCON5 = (rLCDCON5 & ~(1<<3)) ;	// PWREN disable
	rGPGCON = (rGPGCON & ~(0x3<<8)) | 0x1<<8;	// GPG4, PWR_EN -> Output.
	rGPGDAT&=(~(1<<4)); // GPG4=Low
	Delay(50); // GPG4=Low
	rGPGDAT|=(1<<4); //GPG4=High

	//--------LCD frame interrupt setting ------------------------------------START
	pISR_LCD=(unsigned)Lcd_Int_Frame_ForDvs;
	rINTMSK &= ~(BIT_LCD);
	rLCDINTMSK=(1<<2)|(0<<1)|(1); // 8Words Trigger Level,Unmask Frame int,mask Fifo int
	//--------LCD frame interrupt setting ------------------------------------END

}
Ejemplo n.º 2
0
void PWR_Lcd_Tft_16Bit_240320_On(void)
{
    int i,j,k;
    Lcd_Port_Init();
    //Lcd_Lpc3600Enable(); // Enable LPC3600
    Lcd_Init(MODE_TFT_16BIT_240320);
    Glib_Init(MODE_TFT_16BIT_240320);
    Lcd_EnvidOnOff(1);

    Glib_ClearScr(0, MODE_TFT_16BIT_240320);
    Glib_Rectangle(0,0,239,319,0x07e0);
    Glib_FilledRectangle(0,0,20,20,65535);
    Glib_Rectangle(220,300,239,319,65535);
    Glib_Line(0,0,239,319,0x1f);
    Glib_Line(239,0,0,319,0xf800);
    Uart_Printf("TFT 64K color mode test 2!\n");
}