Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1339951
  • 博文数量: 198
  • 博客积分: 1629
  • 博客等级: 上尉
  • 技术积分: 2743
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-01 15:41
文章分类
文章存档

2023年(6)

2022年(20)

2021年(8)

2020年(3)

2018年(17)

2017年(3)

2016年(3)

2015年(9)

2014年(13)

2013年(17)

2012年(77)

2011年(22)

分类: LINUX

2012-10-09 11:17:00

void draw_fb(int xlen)
{
        int x, y;
        unsigned short *dst;
        unsigned int location;
        unsigned short color = 0;
        unsigned char r, g, b;
        r = 8;
        g = 0x20;
        b = 0x15;
        printk("++++++++++++++++show slider++++++++++++++\n");
        for( y = 482; y < 503; y++ ) {
                for( x = 0; x < xlen; x++ )
                {
                        location = y*1600+x*2;
                        dst = g_screen_base + location;
                        if(x < (xlen-200))
                                *dst = 0x4415;
                        else
                        {
                                r = 0x8+(0x10-0x8)*(x-(xlen-200))/(200);
                                g = 0x20+(0x30-0x20)*(x-(xlen-200))/(200);
                                color = r<<11 | g<<5 | b;
                                *dst = color;
                        }
                }
         }
}
EXPORT_SYMBOL(draw_fb);
阅读(1734) | 评论(0) | 转发(1) |
0

上一篇:制作jffs2文件系统-2

下一篇:定点打印信息

给主人留下些什么吧!~~