微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 硬件工程师文库 > wince代码写入LCD驱动参考,数码产品怎样分别是不是LCD坏点

wince代码写入LCD驱动参考,数码产品怎样分别是不是LCD坏点

时间:04-26 来源:网络整理 点击:

ON1=(1《《8)|(MVAL_USED《《7)|(3《《5)|(12《《1)|0;

  // CLKVAL_TFT = 1 , HCLK = 100MHz -》 VCLK = 25MHz

  //TFT LCD panel

  //16 bpp for TFT

  s2410LCD-》rLCDCON2=(VBPD《《24)|(LINEVAL_TFT《《14)|(VFPD《《6)|(VSPW);

  s2410LCD-》rLCDCON3=(HBPD《《19)|(HOZVAL_TFT《《8)|(HFPD);

  s2410LCD-》rLCDCON4=(MVAL《《8)|(HSPW);

  s2410LCD-》rLCDCON5=

  (1《《11)|(0《《10)|(0《《9)|(0《《8)|(0《《7)|(0《《6)|(0《《3)|(0《《1)|(1《《0);

  //5:6:5 Format

  //The video data is fetched at VCLK falling edge

  //VLINE/HSYNC pulse polarity-Normal

  //VFRAME/VSYNC pulse polarity-Normal

  //VD (video data) pulse polarity-Normal

  //VDEN signal polarity-Normal

  //Disable PWREN signal

  //Byte swap Disable

  //Half-Word swap Enable

  ********

  }

  红色部分为修改后的内容:

  WORD TempBuffer[1025][768];

  S3C2410DISP::S3C2410DISP (void)

  {

  ********

  m_nScreenWidth = 1024;

  m_nScreenHeight = 768;

  *********

  }

  到此修改工作基本完成,但还要一个问题:1024*768分辨率占用的显示缓冲区大小是:1024*768*2 = 1536 K Bytes,因此要确认所分配的内存空间够不够,是在config.bib文件中定义的。如果以前定义的足够大,后面的步骤可以省略了。

  4. config.bib

  …\WINCE420\PLATFORM\SMDK2410\FILES\config.bib

  #define NKNAME NK

  #define NKSTART 8C200000

  #define NKLEN 01D00000

  #define RAMSTART 8E000000

  #define RAMLEN 01F00000

  $(NKNAME) $(NKSTART) $(NKLEN) RAMIMAGE

  RAM $(RAMSTART) $(RAMLEN) RAM

  AUD_DMA 8c002000 00002000 RESERVED

  DRV_GLB 8c010000 00010000 RESERVED

  DBGSER_DMA 8c022000 00002000 RESERVED

  SER_DMA 8c024000 00002000 RESERVED

  IR_DMA 8c026000 00002000 RESERVED

  SD_DMA 8c028000 00008000 RESERVED

  EDBG 8c030000 00020000 RESERVED

  CPXIPCHAIN 8c050000 00008000 RESERVED

  SLEEP_BUFF 8c058000 00004000 RESERVED

  DISPLAY 8c100000 00100000 RESERVED

  DISPLAY

  AUD_DMA 8c002000 00002000 RESERVED

  DRV_GLB 8c010000 00010000 RESERVED

  DBGSER_DMA 8c022000 00002000 RESERVED

  SER_DMA 8c024000 00002000 RESERVED

  IR_DMA 8c026000 00002000 RESERVED

  SD_DMA 8c028000 00008000 RESERVED

  EDBG 8c030000 00020000 RESERVED

  CPXIPCHAIN 8c050000 00008000 RESERVED

  SLEEP_BUFF 8c058000 00004000 RESERVED

  ;DISPLAY 8c100000 00100000 RESERVED

  DISPLAY 8c060000 001a0000 RESERVED

  5.

  在(4)中修改了DISPLAY显示缓冲区的开始地址,因此要在"s2410.h"中做相应的修改:

  …\WINCE420\PLATFORM\SMDK2410\INC\s2410.h

  #define DMA_BUFFER_BASE 0xAC000000

  #define DMA_PHYSICAL_BASE 0x30000000

  //#define FRAMEBUF_BASE (DMA_BUFFER_BASE + 0x00100000)

  //#define FRAMEBUF_DMA_BASE (DMA_PHYSICAL_BASE + 0x00100000)

  #define FRAMEBUF_BASE (DMA_BUFFER_BASE + 0x00060000)

  #define FRAMEBUF_DMA_BASE (DMA_PHYSICAL_BASE + 0x00060000)

  6. 在(4)中修改了DISPLAY显示缓冲区的大小, 因此要在"s3c2410disp.cpp"中做相应的修改:

  …\WINCE420\PLATFORM\SMDK2410\DRIVERS\DISPLAY\S3C2410LCD\s3c2410disp.cpp

  红色部分为修改后的内容:

  void S3C2410DISP::IniTIalizeHardware (void)

  {

  *********

  m_VirtualFrameBuffer = (DWORD)VirtualAlloc(0, (0x1A0000), MEM_RESERVE, PAGE_NOACCESS);

  if (m_VirtualFrameBuffer == NULL)

  {

  RETAILMSG(0,(TEXT("m_VirtualFrameBuffer is not allocated\n\r")));

  return;

  }

  else if (!VirtualCopy((PVOID)m_VirtualFrameBuffer, (PVOID)gdwLCDVirtualFrameBase, (0x1A0000), PAGE_READWRITE | PAGE_NOCACHE))

  {

  RETAILMSG(0, (TEXT("m_VirtualFrameBuffer is not mapped\n\r")));

  VirtualFree((PVOID)m_VirtualFrameBuffer, 0, MEM_RELEASE);

  return;

  }

  *********

  }

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top