Chinaunix首页 | 论坛 | 博客
  • 博客访问: 45989
  • 博文数量: 21
  • 博客积分: 855
  • 博客等级: 准尉
  • 技术积分: 230
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-20 14:19
文章分类
文章存档

2011年(1)

2009年(20)

我的朋友
最近访客

分类: LINUX

2009-03-20 14:44:38

一.   修改smdk2440_lcd_cfg结构,它在arch/arm/mach-s3c2440/mach-smdk2440.c文件中

static struct s3c2410fb_mach_info smdk2440_lcd_cfg __initdata = {

       .regs       = {

 

              .lcdcon1  = S3C2410_LCDCON1_TFT16BPP |

                              S3C2410_LCDCON1_TFT |

                              S3C2410_LCDCON1_CLKVAL(0x04),

 

              .lcdcon2  = S3C2410_LCDCON2_VBPD(1) |

                              S3C2410_LCDCON2_LINEVAL(319) |

                              S3C2410_LCDCON2_VFPD(5) |

                              S3C2410_LCDCON2_VSPW(1),

 

              .lcdcon3  = S3C2410_LCDCON3_HBPD(36) |

                              S3C2410_LCDCON3_HOZVAL(239) |

                              S3C2410_LCDCON3_HFPD(19),

 

              .lcdcon4  = S3C2410_LCDCON4_MVAL(13) |

                              S3C2410_LCDCON4_HSPW(5),

 

              .lcdcon5  = S3C2410_LCDCON5_FRM565 |

                              S3C2410_LCDCON5_INVVLINE |

                              S3C2410_LCDCON5_INVVFRAME |

                              S3C2410_LCDCON5_PWREN |

                              S3C2410_LCDCON5_HWSWP,

       },

 

       /* currently setup by downloader */

       .gpccon          = 0xaaaaaaaa,

       .gpccon_mask       = 0xffffffff,

       .gpcup           = 0xffffffff,

       .gpcup_mask  = 0xffffffff,

       .gpdcon          = 0xaaaaaaaa,

       .gpdcon_mask       = 0xffffffff,

       .gpdup           = 0xffffffff,

       .gpdup_mask  = 0xffffffff,

 

       .fixed_syncs   = 1,

       .type              = S3C2410_LCDCON1_TFT,

 

       .width            = 240,

       .height            = 320,

 

       .xres              = {

              .min = 240,

              .max       = 240,

              .defval     = 240,

       },

 

       .yres              = {

              .min = 320,

              .max       = 320,

              .defval = 320,

       },

 

       .bpp        = {

              .min = 16,

              .max       = 16,

              .defval = 16,

       },

};

 

二.   配置内核以使用LCD:

Device Drivers--à

       Graphics support--à

              <*>support for frame buffer device

              <*>S3C2410 LCD framebuffer support

                     Console display driver support--à

                     <*> framebuffer Console support

                     [ ]select compiled-in fonts

              [*]bootup logo--à

                     [*]standard 224-color linux logo

 

三.   make uImage,下载到板子上

四.   操作/dev/fb0绘制图像

#Mknod  /dev/fb0 c 29 0

#Fb_test  /dev/fb0

 

五.   命令行参数加一项 console=tty1

六.   创建设备文件

#mknod  /dev/tty0  c 4 0

#mknod  /dev/tty1  c 4 1

#mknod  /dev/tty2  c 4 2

#mknod  /dev/tty3  c 4 3

#mknod  /dev/tty4  c 4 4

#mknod  /dev/tty5  c 4 5

#mknod  /dev/tty6  c 4 6

.#echo hello>/dev/tty0 或者 >/dev/tty1命令可以在LCD上显示”hello”,

阅读(1194) | 评论(0) | 转发(0) |
0

上一篇:十五.USB配置

下一篇:十七.Qtopia移植

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