⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcd_cfg.h

📁 ucosII在TMS320LF2407成功移植的源代码
💻 H
字号:
/*
*******************************************************************************
*                             Shanghai Maritime University
*                                Pudong Avenue 1550#
*
*                            (c)Copyright 2005,SMSC,Shanghai,China
*                                  All Rights Reserved
*
*
*
* Filename   : LCD_CFG.h
* Programmer : Chen Jutao(Jason Chen)
* Description: This C header file is used to configure the LCD drivers.
* 
********************************************************************************
*/  

#ifndef   LCD_CFG_H
#define    LCD_CFG_H
/*
*****************************************************
*                              Include files
*****************************************************
*/
//#include "Data_types.h"
#include "ASCII.h"
#include "includes.h"
/*
*****************************************************
*                  Definition of Characteristics of LCD
*****************************************************
*/
#define DISP_MAX_ROWS         64
#define DISP_MAX_COLS         128
#define DISP_MAX_PAGES          8
#define DISP_ROWS_PERPAGE       8
/*
*****************************************************
*                  Configure Display Support 
*****************************************************
*/
#define DISP_NONASCII_CHAR      0
#define DISP_PICTURE            0

/*
*****************************************************
*                  Configure Multitask Support 
*****************************************************
*/
#define MULTITASK          1
#define OS                uCOS_II
/*
*****************************************************
*                           Definition of Constants
*****************************************************
*/
#ifndef TRUE
#define TRUE    1
#endif

#ifndef FALSE
#define FALSE  0
#endif

#ifndef LEFT
#define LEFT    TRUE
#endif

#ifndef RIGHT
#define RIGHT  FALSE
#endif
/*
*****************************************************
*             Definition of Instruction and Data Ports
*****************************************************
*/
#if MULTITASK == 1

#if OS == uCOS_II
static OS_EVENT *DispSem;
#define xOSSemBCreate(options,init)               OSSemCreate(init)
#define xOSSemTake(sem,timeout,addtion)     OSSemPend(sem,timeout,addtion)
#define xOSSemGive(sem)                                 OSSemPost(sem)
#define DELAY(Ticks)                                       Delay(Ticks)//   OSTimeDly(Ticks)
 /*--------------------------------------------------------
   If the macroes of 'INT_DISABLE()' and 'INT_ENABLE() ' are defined, 
   remember to add ';' at  each end of these two macro contents.
   -------------------------------------------------------*/
#define INT_DISABLE()     asm("   SETC INTM");
#define INT_ENABLE()       asm("   CLRC INTM");
#endif

#else
#define DELAY(cnt)     Delay(cnt)
/*--------------------------------------------------------
   If the macroes of 'INT_DISABLE()' and 'INT_ENABLE() ' are defined, 
   remember to add ';' at  each end of these two macro contents.
   -------------------------------------------------------*/
#define INT_DISABLE()     asm("   SETC INTM");
#define INT_ENABLE()       asm("   CLRC INTM");

#endif

/*
*****************************************************
*            Definition of Instruction and Data Ports
*****************************************************
*/
ioport unsigned int port8001;
ioport unsigned int port8002;
ioport unsigned int port8003;
ioport unsigned int port8004;

#define Disp_InstrAddr          port8001
#define Disp_L_DataAddr       port8003
#define Disp_Aux_InstrAddr  port8002
#define Disp_R_DataAddr       port8004

/*
*****************************************************
*                Definition of Operation Commands
*****************************************************
*/
#define DISP_CMD_TURNON               0x3F
#define DISP_CMD_TURNOFF             0x3E
#define DISP_CMD_SETSTARTLINE    0xC0
#define DISP_CMD_SETPAGE              0xB8
#define DISP_CMD_SETY                    0x40
#define DISP_CMD_AUXILIARY           0x0

/*
*****************************************************
*                        Other Specific Definitions 
*****************************************************
*/
#define FONT0    0
#define FONT1    1
#define FONT2    2
#define FONT3    3

#define PIC0       0
/*
*****************************************************
*             Font Table and Picture Table 
*****************************************************
*/
typedef struct Disp_Disp_Bitmap_Attrib_tag{
    INT8U  name[10];
    INT8U *BitmapData;
    INT8U BitmapWidth ;     
    INT8U BitmapHeight ;  
    INT8U BitmapArrayLength; 
    INT8U BitmapTotalPages;
}Disp_Bitmap_Attrib;

Disp_Bitmap_Attrib FontTable[]={
	{"SysFont",SysFontASCII,5,8,5,1}/*,
	{"Font1",nAsciiDot1,8,16,16,2},
	{"CNChar",GB_16,16,16,32,2},
	{"Font3",nAsciiDot2,12,24,36,3}*/
   };
   
#if DISP_PICTURE == 1
Disp_Bitmap_Attrib PicTable[]={
	{"Pic1",nBitmapDot,128,64,1024,8}
   };
#endif

#endif  /* End of LCD_CFG_H */
/*
*******************************************************************
                                     End of LCD_CFG.h  
*******************************************************************
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -