修改GUIConf.h和LCDConf.h;
#define GUI_OS (0) /* Compile with multitasking support */
#define GUI_SUPPORT_TOUCH (0) /* Support a touch screen (req. win-manager) */
#define GUI_SUPPORT_UNICODE (1) /* Support mixed ASCII/UNICODE strings */
#define GUI_DEFAULT_FONT &GUI_Font8x8
#define GUI_ALLOC_SIZE 1024 /* Size of dynamic memory ... For WM and memory devices*/
/*********************************************************************
*
* Configuration of available packages
*/
#define GUI_WINSUPPORT 1 /* Window manager package available */
#define GUI_SUPPORT_MEMDEV 0 /* Memory devices available */
#define GUI_SUPPORT_AA 0 /* Anti aliasing available */
*
* General configuration of LCD
*
**********************************************************************
*/
#define LCD_XSIZE (320) /* X-resolution of LCD, Logical coor. */
#define LCD_YSIZE (240) /* Y-resolution of LCD, Logical coor. */
#define LCD_CONTROLLER (1335)
#define LCD_BITSPERPIXEL (1)
/*********************************************************************
*
* Simple bus configuration
*
**********************************************************************
*/
/* L
void LCD_WRITE_A1(int ) ;
void LCD_WRITE_A0(int ) ;
char LCD_READ_A1(void) ;
#define LCD_WRITE_A1(Byte) LCD_X_Write01(Byte)
#define LCD_WRITE_A0(Byte) LCD_X_Write00(Byte)
#define LCD_READ_A1() LCD_X_Read01()
#endif CDCONF_H */
//void LCD_WRITE_A0(int);
//void LCD_WRITE_A1(int);
//unsigned char LCD_READ_A1(void);
//#define LCD_WRITE_A1(int) LCD_X_Write01(int)
//#define LCD_WRITE_A0(int) LCD_X_Write00(int)
//#define LCD_READ_A1(void) LCD_X_Read01(void)
另外自己写四个个函数,其中后三个函数很关键,第一个函数弄成个空的,它是检查busy用的不是必须的:
unsigned char LCD_READ_A0(void)
{
return(1);
}
void LCD_WRITE_A0(int datax)
{
A0_OFF();
lcd_DATA(datax);
CS_OFF();
WR_OFF();
Delay(30);
WR_ON();
CS_ON();
A0_ON();
}
void LCD_WRITE_A1(int cmdx)
{
lcd_CMD(cmdx);
A0_ON();
CS_OFF();
WR_OFF();
Delay(30);
WR_ON();
CS_ON();
}
unsigned char LCD_READ_A1(void)
{
unsigned char address_data;
lcd_DATA(0xff);
LCD_DATA_DIR_IN();
A0_ON();
CS_OFF();
RD_OFF();
address_data =GPIO_ReadInputData(GPIOD)&0xff;
RD_ON();
CS_ON();
A0_ON();
LCD_DATA_DIR_OUT();
return(address_data);
}
void lcd_cmdwrite(uint8_t cmdx)
{
lcd_CMD(cmdx);
A0_ON();
CS_OFF();
WR_OFF();
Delay(30);
WR_ON();
CS_ON();
}
并且把LCDSLin.c中的LCD_WAIT()宏定义屏蔽掉换成空函数即可
#ifndef LCD_WAIT
#define LCD_WAIT() {} //\
// while (!(LCD_READCMD0()&0x40)); \
// while ( LCD_READCMD0()&0x40) ;
目前进度就这样,下一步和UCOSII配合起来跑,上一张图片
(原文件名:C360_2011-04-09 18-46-18.jpg) |
| |
|