在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
芯片精品文章合集(500篇!) 创芯人才网--重磅上线啦!
查看: 6726|回复: 1

[求助]请教一下关于framebuffer地址定义的问题

[复制链接]
发表于 2006-7-24 09:42:37 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

.

.

#if (LCD_TYPE==MLCD_240_320)

#define SCR_XSIZE     (480)  

#define SCR_YSIZE     (640)

.

.

.

#define ARRAY_SIZE_G16        (SCR_XSIZE/2*SCR_YSIZE)

.

.

unsigned int (*frameBuffer16)[SCR_XSIZE/8];

.

.

void Lcd_Init(int depth)

{        

    switch(depth)

    {case 16:

       if((U32)frameBuffer16==0)

       {

           //The total frame memory should be inside 4MB.

           //For example, if total memory is 8MB, the frame memory

           //should be in 0xc000000~0xc3fffff or c400000~c7fffff.

           //But, the following code doesn't meet this condition(4MB)

           //if the code size & location is changed..

           frameBuffer16=(unsigned int (*)[SCR_XSIZE/8])malloc(ARRAY_SIZE_G16);

        .

        .

        .


       }

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void _PutPixelG16(U32 x,U32 y,U8 c)

{

    if(x<SCR_XSIZE && y<SCR_YSIZE)

        frameBuffer16[(y)][(x)/8]=( frameBuffer16[(y)][x/8] & ~(0xc0000000>>((x)%8)*4) )

            | ( (c)<<((8-1-((x)%8))*4) );

}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
在这段函数中framebuffer16所指向的首地址是0xc000000吗?在哪里有定义的吗?还是直接指向的?哪位高手能解释一下吗?
 楼主| 发表于 2006-7-27 09:59:24 | 显示全部楼层
怎么没人回我,是都不知道还是不想告诉我?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-7-1 23:02 , Processed in 0.119808 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表