微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > uboot 下S3C6410 的LCD 显示

uboot 下S3C6410 的LCD 显示

时间:11-11 来源:互联网 点击:

VIDTCON1_HSPW(res_mode->1_HSPW(res_mode->hsync_len));

fb->VIDTCON2 = (VIDTCON2_LINEVAL(pGD->winSizeY - 1) | VIDTCON2_HOZVAL(pGD->winSizeX - 1));

#if defined(LCD_VIDEO_BACKGROUND)

fb->WINCON0 = (WINCON0_BPPMODE_16BPP_565 | WINCONx_ENWIN | WINCONx_HAWSWP);

fb->VIDOSD0A = (VIDOSDxA_TOPLEFT_X(0) | VIDOSDxA_TOPLEFT_Y(0));

fb->VIDOSD0B = (VIDOSDxB_BOTRIGHT_X(pGD->winSizeX - 1) | VIDOSDxB_BOTRIGHT_Y(pGD->winSizeY - 1));

fb->VIDOSD0C = (pGD->winSizeY * pGD->winSizeX);

#endif

fb->WINCON1 = (WINCON1_BPPMODE_16BPP_565 | WINCONx_ENWIN | WINCONx_HAWSWP);

fb->VIDOSD1A = (VIDOSDxA_TOPLEFT_X(0) | VIDOSDxA_TOPLEFT_Y(0));

fb->VIDOSD1B = (VIDOSDxB_BOTRIGHT_X(pGD->winSizeX - 1) | VIDOSDxB_BOTRIGHT_Y(pGD->winSizeY - 1));

#if defined(LCD_VIDEO_BACKGROUND)

fb->VIDOSD1C = (VIDISD14C_ALPHA0_R(LCD_VIDEO_BACKGROUND_ALPHA) |

VIDISD14C_ALPHA0_G(LCD_VIDEO_BACKGROUND_ALPHA) |

VIDISD14C_ALPHA0_B(LCD_VIDEO_BACKGROUND_ALPHA) );

// fb->VIDOSD1C = (pGD->winSizeY * pGD->winSizeX)&0xffffff;

#endif

fb->VIDOSD1D = (pGD->winSizeY * pGD->winSizeX);

// fb->VIDOSD1D = (500 * 300);

#if defined(LCD_VIDEO_BACKGROUND)

/* config Display framebuffer addr for background*/

fb-> VIDW00ADD0B0 = LCD_VIDEO_BACKGROUND_ADDR;

/* This marks the end of the frame buffer. */

fb-> VIDW00ADD1B0 = (fb->VIDW00ADD0B0 &0xffffff) + (pGD->winSizeX+0) * pGD->winSizeY * 2;

fb-> VIDW00ADD2= ((pGD->winSizeX * 2) & 0x1fff);

#endif

/* config Display framebuffer addr for console*/

fb-> VIDW01ADD0B0 = pGD->frameAdrs;

/* This marks the end of the frame buffer. */

fb-> VIDW01ADD1B0 = (fb->VIDW01ADD0B0 &0xffffff) + (pGD->winSizeX+0) * pGD->winSizeY * 2;

fb-> VIDW01ADD2= ((pGD->winSizeX * 2) & 0x1fff);

/* Enable Display */

fb-> VIDCON0 |= (VIDCON0_ENVID | VIDCON0_ENVID_F); /* ENVID = 1 ENVID_F = 1*/

return ((void*)&smi);

}

void

video_set_lut (unsigned int index, /* color number */

unsigned char r, /* red */

unsigned char g, /* green */

unsigned char b /* blue */

)

{

}

//just init some reg for enable LCD

void board_video_init(GraphicDevice *pGD)

{

*(volatile unsigned long *)(0x7F008100) = 0xaaaaaaaa;//GPICON = 0xaaaaaaaa

*(volatile unsigned long *)(0x7F008108) = 0xaaaaaaaa;//GPIPUD = 0xaaaaaaaa

*(volatile unsigned long *)(0x7F008120) = 0xaaaaaaaa;//GPJCON = 0xaaaaaaaa

*(volatile unsigned long *)(0x7F008128) = 0xaaaaaaaa;//GPJPUD = 0xaaaaaaaa

*(volatile unsigned long *)(0x7F0081A0) &= ~(0x03);

*(volatile unsigned long *)(0x7F0081A0) |= 0x01;//特殊端口控制寄存器,选择LCD I/F 管脚组态为01=RGB I/F 形态。

*(volatile unsigned long *)(0x7410800C) &= ~(1<3);//调制解调器接口端口控制寄存器(MIFPCON)的第三位SEL_BYPASS必须设这成0.

}

#endif /* CONFIG_VIDEO_S3C64X0 */

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top