文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>十六.LCD驱动移植

十六.LCD驱动移植

时间:2009-03-20  来源:chenkuizhong

一.   修改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”,

相关阅读 更多 +
排行榜 更多 +
魔方仆从冲刺

魔方仆从冲刺

休闲益智 下载
跑山越野摩托

跑山越野摩托

体育竞技 下载
我要造赛车

我要造赛车

体育竞技 下载