TFT液晶屏驱动移植
来源:互联网 发布:苹果系统修改软件 编辑:程序博客网 时间:2024/04/28 02:35
1、打开 arch/arm/mach-s3c2440/mach-smdk2440.c,先删除之前的 LCD 设备平台代码
/* LCD driver info */
static struct s3c2410fb_display smdk2440_lcd_cfg __initdata = {
……
}
static struct s3c2410fb_mach_info smdk2440_fb_info __initdata = {
……
}
--------------------------------------------------------------------------------
2、再把已经移植好的代码加入,如下:
/* LCD driver info */
//2440 3.5”LCD的配置和参数设置
#if defined(CONFIG_FB_S3C2410_W320240)
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
#define LCD_PIXCLOCK 100000
#define LCD_RIGHT_MARGIN 23
#define LCD_LEFT_MARGIN 18
#define LCD_HSYNC_LEN 43
#define LCD_UPPER_MARGIN 6
#define LCD_LOWER_MARGIN 4
#define LCD_VSYNC_LEN 14
//NEC 3.5”LCD的配置和参数设置
#elif defined(CONFIG_FB_S3C2410_N240320)
#define LCD_WIDTH 240
#define LCD_HEIGHT 320
#define LCD_PIXCLOCK 100000
#define LCD_RIGHT_MARGIN 36
#define LCD_LEFT_MARGIN 19
#define LCD_HSYNC_LEN 5
#define LCD_UPPER_MARGIN 1
#define LCD_LOWER_MARGIN 5
#define LCD_VSYNC_LEN 1
//夏普 8”LCD的配置和参数设置
#elif defined(CONFIG_FB_S3C2410_TFT640480)
#define LCD_WIDTH 640
#define LCD_HEIGHT 480
#define LCD_PIXCLOCK 80000
#define LCD_RIGHT_MARGIN 67
#define LCD_LEFT_MARGIN 40
#define LCD_HSYNC_LEN 31
#define LCD_UPPER_MARGIN 25
#define LCD_LOWER_MARGIN 5
#define LCD_VSYNC_LEN 1
//统宝 3.5”LCD的配置和参数设置
#elif defined(CONFIG_FB_S3C2410_T240320)
#define LCD_WIDTH 240
#define LCD_HEIGHT 320
#define LCD_PIXCLOCK 146250//170000
#define LCD_RIGHT_MARGIN 25
#define LCD_LEFT_MARGIN 0
#define LCD_HSYNC_LEN 4
#define LCD_UPPER_MARGIN 1
#define LCD_LOWER_MARGIN 4
#define LCD_VSYNC_LEN 1
//群创 7”LCD的配置和参数设置
#elif defined(CONFIG_FB_S3C2410_TFT800480)
#define LCD_WIDTH 800
#define LCD_HEIGHT 480
#define LCD_PIXCLOCK 11463 //40000
#define LCD_RIGHT_MARGIN 67
#define LCD_LEFT_MARGIN 40
#define LCD_HSYNC_LEN 31
#define LCD_UPPER_MARGIN 25
#define LCD_LOWER_MARGIN 5
#define LCD_VSYNC_LEN 1
//LCD2VGA(分辨率为 1024x768)模块的配置和参数设置
#elif defined(CONFIG_FB_S3C2410_VGA1024768)
#define LCD_WIDTH 1024
#define LCD_HEIGHT 768
#define LCD_PIXCLOCK 80000
#define LCD_RIGHT_MARGIN 15
#define LCD_LEFT_MARGIN 199
#define LCD_HSYNC_LEN 15
#define LCD_UPPER_MARGIN 1
#define LCD_LOWER_MARGIN 1
#define LCD_VSYNC_LEN 1
#define LCD_CON5 (S3C2410_LCDCON5_FRM565 | S3C2410_LCDCON5_HWSWP)
#endif
#if defined (LCD_WIDTH)
static struct s3c2410fb_display smdk2440_lcd_cfg __initdata = {
#if !defined (LCD_CON5)
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
S3C2410_LCDCON5_PWREN |
S3C2410_LCDCON5_HWSWP,
#else
.lcdcon5 = LCD_CON5,
#endif
.type = S3C2410_LCDCON1_TFT,
.width = LCD_WIDTH,
.height = LCD_HEIGHT,
.pixclock = LCD_PIXCLOCK,
.xres = LCD_WIDTH,
.yres = LCD_HEIGHT,
.bpp = 16,
.left_margin = LCD_LEFT_MARGIN + 1,
.right_margin = LCD_RIGHT_MARGIN + 1,
.hsync_len = LCD_HSYNC_LEN + 1,
.upper_margin = LCD_UPPER_MARGIN + 1,
.lower_margin = LCD_LOWER_MARGIN + 1,
.vsync_len = LCD_VSYNC_LEN + 1,
};
static struct s3c2410fb_mach_info smdk2440_fb_info __initdata = {
.displays = &smdk2440_lcd_cfg,
.num_displays = 1,
.default_display = 0,
.gpccon = 0xaa955699,
.gpccon_mask = 0xffc003cc,
.gpcup = 0x0000ffff,
.gpcup_mask = 0xffffffff,
.gpdcon = 0xaa95aaa1,
.gpdcon_mask = 0xffc0fff0,
.gpdup = 0x0000faff,
.gpdup_mask = 0xffffffff,
.lpcsel = 0xf82,
};
#endif
注:我只试过第一个配置,其它配置本人未测试过。
--------------------------------------------------------------------------------
3、 打开 drivers/video/Kconfig,加入以下配置信息:
config FB_S3C2410_DEBUG
bool "S3C2410 lcd debug messages"
depends on FB_S3C2410
help
Turn on debugging messages. Note that you can set/unset at run time
through sysfs
choice
prompt "LCD select"
depends on FB_S3C2410
help
3C24x0 LCD size select
config FB_S3C2410_W320240
boolean "3.5 inch 320X240 WANXIN LCD"
depends on FB_S3C2410
help
3.5 inch 240X320 WANXIN LCD
config FB_S3C2410_T240320
boolean "3.5 inch 240X320 Toppoly LCD"
depends on FB_S3C2410
help
3.5 inch 240X320 Toppoly LCD
config FB_S3C2410_N240320
boolean "3.5 inch 240X320 NEC LCD"
depends on FB_S3C2410
help
3.5 inch 240x320 NEC LCD
config FB_S3C2410_TFT640480
boolean "8 inch 640X480 L80 LCD"
depends on FB_S3C2410
help
8 inch 640X480 LCD
config FB_S3C2410_TFT800480
boolean "7 inch 800x480 TFT LCD"
depends on FB_S3C2410
help
7 inch 800x480 TFT LCD
config FB_S3C2410_VGA1024768
boolean "VGA 1024x768"
depends on FB_S3C2410
help
VGA 1024x768
endchoice
config BACKLIGHT_SMDK2440
-----------------------------------------------------------------------
4、配置内核
Device Drivers --->
Graphics support --->
<*> Support for frame buffer devices --->
Enable firmware EDID
Enable Video Mode Handling Helpers
<*> S3C2410 LCD framebuffer support
LCD select (3.5 inch 320X240 WANXIN LCD) --->
- TFT液晶屏驱动移植
- S3C2440A驱动RGB TFT液晶屏的研究
- TFT STN液晶屏区别
- TFT液晶屏显示原理
- 液晶屏UFB、STN、TFT比较
- HT68F30控制GPG96244QS1 TFT液晶屏
- STM32官方评估板TFT LCD驱动移植注意点
- TFT液晶屏使用自建的英文字库
- stm32 SPFD5420A TFT液晶屏调试字体旋转
- 采用CPLD或者FPGA显示TFT液晶屏
- 单片机控制TFT液晶屏显示数字
- 四十一.TFT客户端移植
- Linux液晶屏驱动开发
- Linux液晶屏驱动开发
- Linux液晶屏驱动开发
- 单片机驱动段式液晶屏
- verilog驱动1602液晶屏
- 液晶屏驱动相关资料
- OpenGL进阶(十) - obj文件的导入
- iOS: NSDictionary的方法keysSortedByValueUsingComparator:
- 小时代
- 2013苹果获奖
- C++ 之 STL
- TFT液晶屏驱动移植
- C++ 用栈实现字符串中括号匹配问题()
- Android开发优化之——从代码角度进行优化(转载)
- 2013年多校4
- iOS: NSDictionary的方法keysSortedByValueUsingSelector:
- oracle中无监听程序的问题
- C/C++中头文件格式
- TestNG 教程1 – 基本使用方法
- 北漂是为了什么