当前位置: 技术问答>linux和unix
2440 camera 数据无法显示到lcd
来源: 互联网 发布时间:2016-05-11
本文导语: 各位大侠,小弟是第一次发帖,还请各位多多指教!最近在linux2.6下开发基于S3C2440的camera驱动,视频数据通过lcd显示,现在的问题是camera数据无法显示到lcd上面,可以确定lcd驱动是正常的;现贴出一些相关程序: #defi...
各位大侠,小弟是第一次发帖,还请各位多多指教!最近在linux2.6下开发基于S3C2440的camera驱动,视频数据通过lcd显示,现在的问题是camera数据无法显示到lcd上面,可以确定lcd驱动是正常的;现贴出一些相关程序:
#define VIDEOMEMSIZE (2*320*240) // 1 MB ,lcd 一屏的数据字节数
unsigned int pVideoBuffer; //写入lcdaddr的那个值
static unsigned char*videomemory;
static u_long videomemorysize = VIDEOMEMSIZE;
int DEMO_init_module(void)
{
int result;
dev_t dev = 0;
dev = MKDEV(DEMO_MAJOR, DEMO_MINOR);
result = register_chrdev_region(dev, 1, "DEMO");
if (result cdev, &DEMO_fops);
DEMO_devices->cdev.owner = THIS_MODULE;
DEMO_devices->cdev.ops = &DEMO_fops;
result = cdev_add (&DEMO_devices->cdev, dev, 1);
if(result)
{
printk(KERN_NOTICE "Error %d adding DEMOn", result);
goto fail;
}
gf_base_int = ioremap(0x4a000000,0x20);
gf_base_gpio_b= ioremap(0x56000010, 0x0c);
gf_base_gpio_c = ioremap(0x56000020,0x0c);
gf_base_gpio_d= ioremap(0x56000030, 0x0c);
gf_base_gpio_e = ioremap(0x56000040,0x0c);
gf_base_gpio_f= ioremap(0x56000050, 0x0c);
gf_base_gpio_g = ioremap(0x56000060,0x0c);
gf_base_gpio_j= ioremap(0x560000d0, 0x0c);
gf_base_lcd_con1= ioremap(0x4d000000, 0x60);
gf_base_clk_power = ioremap(0x4c000000,0x20);
gf_base_camera = ioremap(0x4f000000,0xa4);
request_dma(1,"DEMO");
videomemorysize=PAGE_ALIGN(videomemorysize+PAGE_SIZE);
videomemory=dma_alloc_writecombine(NULL,videomemorysize,&pVideoBuffer,GFP_KERNEL);
memset(videomemory, 10, videomemorysize); //这里可以使lcd全屏显示某一种颜色
}
static void Lcd_Init(void)
{
rLCDCON1=(7
#define VIDEOMEMSIZE (2*320*240) // 1 MB ,lcd 一屏的数据字节数
unsigned int pVideoBuffer; //写入lcdaddr的那个值
static unsigned char*videomemory;
static u_long videomemorysize = VIDEOMEMSIZE;
int DEMO_init_module(void)
{
int result;
dev_t dev = 0;
dev = MKDEV(DEMO_MAJOR, DEMO_MINOR);
result = register_chrdev_region(dev, 1, "DEMO");
if (result cdev, &DEMO_fops);
DEMO_devices->cdev.owner = THIS_MODULE;
DEMO_devices->cdev.ops = &DEMO_fops;
result = cdev_add (&DEMO_devices->cdev, dev, 1);
if(result)
{
printk(KERN_NOTICE "Error %d adding DEMOn", result);
goto fail;
}
gf_base_int = ioremap(0x4a000000,0x20);
gf_base_gpio_b= ioremap(0x56000010, 0x0c);
gf_base_gpio_c = ioremap(0x56000020,0x0c);
gf_base_gpio_d= ioremap(0x56000030, 0x0c);
gf_base_gpio_e = ioremap(0x56000040,0x0c);
gf_base_gpio_f= ioremap(0x56000050, 0x0c);
gf_base_gpio_g = ioremap(0x56000060,0x0c);
gf_base_gpio_j= ioremap(0x560000d0, 0x0c);
gf_base_lcd_con1= ioremap(0x4d000000, 0x60);
gf_base_clk_power = ioremap(0x4c000000,0x20);
gf_base_camera = ioremap(0x4f000000,0xa4);
request_dma(1,"DEMO");
videomemorysize=PAGE_ALIGN(videomemorysize+PAGE_SIZE);
videomemory=dma_alloc_writecombine(NULL,videomemorysize,&pVideoBuffer,GFP_KERNEL);
memset(videomemory, 10, videomemorysize); //这里可以使lcd全屏显示某一种颜色
}
static void Lcd_Init(void)
{
rLCDCON1=(7
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。