linux驱动tft屏幕,Linux2.6.26.5加入TFT-LCD驱动

首先下载内核源码,我这里用的是linux-2.6.26.5的内核源码。本文引用地址:http://www.eepw.com.cn/article/148334.htm

(1) 在arch/arm/mach-s3c2410/mach-smdk2410.c里添加头文件:

#include

(2) 在arch/arm/ plat-s3c24xx / commON-smdk.c文件中添加如下信息:

#include

然后添加如下代码:

STatic struct s3c2410fb_display qt2410_LCD_cfg[] __initdata = {

{

.LCDcon5 = S3C2410_LCDCON5_FRM565 |

S3C2410_LCDCON5_INVVCLK|

S3C2410_LCDCON5_INVVLINE |

S3C2410_LCDCON5_INVVframe.|

S3C2410_LCDCON5_PWREN |

S3C2410_LCDCON5_HWSWP,

.type = S3C2410_LCDCON1_TFT,

.width = 320,

.height = 240,

.pixclock = 100000, /* HCLK/10 */

.xres = 320,

.yres = 240,

.bpp = 16,

.left_margin = 13,

.right_margin = 8,

.hsync_len = 4,

.upper_margin = 2,

.lower_margin = 7,

.vsync_len = 4,

}

};

static struct s3c2410fb_mach_info qt2410_fb_info __initdata = {

.displays = qt2410_lcd_cfg,

.num_displays = ARRAY_SIZE(qt2410_lcd_cfg),

.default_display = 0,

.lpcsel = ((0xCE6) ~7) | 14,

};

在smdk_machine_init函数里添加:

s3c24xx_fb_set_platdata(qt2410_fb_info);

(3) 重新配置内核

# make menuconfig

Device Drivers

Graphics support→

Support for frAME. buffer devices→

76762faf0255e549738d25760f943b13.png

(4) 重新编译内核

#make zImage

这样你新编译的内核就支持LCD驱动了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值