s3c44box LCD初始化提示 MVAL_USED 未声明是怎么回事?

小朋友有很多问号
  • 767

嵌入式实验 实现点阵造字,
按照指导书上代码初始化 LCD代码如下

#define SCR_XSIZE (320)
#define SCR_YSIZE (240)
LCD_EXT unsigned int aLcdActiveBuffer[SCR_YSIZE][SCR_XSIZE/32];
#define LCD_PutPixel(x,y,c) \
 aLcdActiveBuffer[(y)][(x)/32] = (aLcdActiveBuffer[(y)][(x)/32] & ~(0x1 << ((32-1-((x)%32))*1))) | ((c) << ((32-1-((x)%32))*1));


void Lcd_Init (void) 
{        
 rLCDCON1=(0x0)|(2<<5)|(MVAL_USED<<7)|(0x3<<8)|(0x3<<10)|(CLKVAL_COLOR<<12); 
     // disable,8B_SNGL_SCAN,WDLY=8clk,WLH=8clk, 
 rLCDCON2=(LINEVAL)|(HOZVAL_COLOR<<10)|(10<<21);   
     //LINEBLANK=10 (without any calculation)  
 rLCDSADDR1= (0x3<<27) | ( ((unsigned int)aLcdActiveBuffer>>22)<<21 ) | M5D((unsigned 
int)aLcdActiveBuffer>>1); 
 // 256-color, LCDBANK, LCDBASEU 
 rLCDSADDR2= M5D((((unsigned int)aLcdActiveBuffer+(SCR_XSIZE*LCD_YSIZE))>>1)) | 
(MVAL<<21); 
 rLCDSADDR3= (LCD_XSIZE/2) | ( ((SCR_XSIZE-LCD_XSIZE)/2)<<9 ); 

 //The following value has to be changed for better display. 

 rREDLUT  =0xfdb96420; 
 rGREENLUT=0xfdb96420; 
 rBLUELUT =0xfb40; 

 rDITHMODE=0x0; 
 rDP1_2 =0xa5a5;       
 rDP4_7 =0xba5da65; 
 rDP3_5 =0xa5a5f; 
 rDP2_3 =0xd6b; 
 rDP5_7 =0xeb7b5ed; 
 rDP3_4 =0x7dbe; 
 rDP4_5 =0x7ebdf; 
 rDP6_7 =0x7fdfbfe; 

 rLCDCON1=(0x1)|(2<<5)|(MVAL_USED<<7)|(0x3<<8)|(0x3<<10)|(CLKVAL_COLOR<<12); 
 rPDATE=0xfe; 
 Lcd_Clr(); 
} 

会报出一大推未声明的错误,典型如
LCD_EXT unsigned int aLcdActiveBuffer[SCR_YSIZE][SCR_XSIZE/32];
rLCDCON1=(0x0)|(2<<5)|(MVAL_USED<<7)|(0x3<<8)|(0x3<<10)|(CLKVAL_COLOR<<12);
rLCDCON2=(LINEVAL)|(HOZVAL_COLOR<<10)|(10<<21);
等。
请问这是什么原因?是不是我少添加了什么东西?

回复
阅读 4.1k
1 个回答

结贴~ 缺少初始化的代码。

宣传栏