drivers/vga/lcd.c File Reference

Go to the source code of this file.

Functions

void F_LcdInit (void)
void F_LcdBufferClear (void)

Variables

unsigned short int *const LCDFrameBuffer = (unsigned short int*)0x30500000


Function Documentation

void F_LcdBufferClear ( void   ) 

Definition at line 25 of file lcd.c.

00025                            {
00026     memset(LCDFrameBuffer, 0xff, LCD_DISPLAY_XSIZE*LCD_DISPLAY_YSIZE*2);
00027 }

void F_LcdInit ( void   ) 

Definition at line 5 of file lcd.c.

00005                     {
00006     rGPCUP=0xffffffff;  // Disable Pull-up register
00007     rGPCCON=0xaaaaaaaa; //Initialize VD[7:0],LCDVF[2:0],VM,VFRAME,VLINE,VCLK,LEND 
00008     rGPDUP=0xffffffff;  // Disable Pull-up register
00009     rGPDCON=0xaaaaaaaa; //Initialize VD[23:8]
00010     rLCDCON1= LCD_DISPLAY_CLKVAL|MVAL_USED|MODE_TFT|BPP_16|LCD_DIS;
00011     rLCDCON2=(LCD_DISPLAY_VBPD<<24)|(LCD_DISPLAY_LINEVAL<<14)|(LCD_DISPLAY_VFPD<<6)|(LCD_DISPLAY_VSPW);
00012     rLCDCON3=(LCD_DISPLAY_HBPD<<19)|(LCD_DISPLAY_HOZVAL<<8)|(LCD_DISPLAY_HFPD);
00013     rLCDCON4=(MVAL<<8)|(LCD_DISPLAY_HSPW);
00014     //0x00 XX XX XX
00015     // ---  R  G  B
00016     // BPP24:LSB,5:6:5 Format,HSYNC and VSYNC are inverted,half-word swap
00017     rLCDCON5=(0<<12)|(1<<11)|(1<<9)|(1<<8)|(1<<3)|1; 
00018     rLCDSADDR1=( ( (unsigned int)LCDFrameBuffer >> 22) << 21 ) | M5D ( (unsigned int)LCDFrameBuffer >> 1 );
00019     rLCDSADDR2=M5D( ( (unsigned int)LCDFrameBuffer + (LCD_DISPLAY_XSIZE*LCD_DISPLAY_YSIZE*2 ) ) >> 1 );
00020     rLCDSADDR3=(0<<11)|(LCD_DISPLAY_XSIZE*1);
00021     rTCONSEL &= ~((1<<4)|1); // Disable LPC3600 & LCC3600
00022     rTPAL=0; // Disable Temp Palette
00023     rLCDCON1 = rLCDCON1 | LCD_EN;
00024 }


Variable Documentation

unsigned short int* const LCDFrameBuffer = (unsigned short int*)0x30500000

Definition at line 3 of file lcd.c.


Generated on Tue Sep 2 08:45:41 2008 for A Simple operation System using S3C2410 by  doxygen 1.5.6