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

📄 lcd_dvc.h

📁 nucleus 文件系统,内核和彩色图形系统,在小系统上非常好用
💻 H
字号:
/*************************************************************************/
/*                                                                       */
/*        Copyright (c) 1999 Accelerated Technology, Inc.                */
/*                                                                       */
/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
/* subject matter of this material.  All manufacturing, reproduction,    */
/* use, and sales rights pertaining to this subject matter are governed  */
/* by the license agreement.  The recipient of this software implicitly  */
/* accepts the terms of the license.                                     */
/*                                                                       */
/*************************************************************************/

/*************************************************************************/
/*                                                                       */
/* FILE NAME                                            VERSION          */
/*                                                                       */
/*      lcd_dvc.h                                        1.3             */
/*                                                                       */
/* COMPONENT                                                             */
/*                                                                       */
/*      All                                                              */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This file contains the device dependent structures.              */
/*                                                                       */
/* AUTHOR                                                                */
/*                                                                       */
/*      Robert G. Burrill, Accelerated Technology, Inc.                  */
/*                                                                       */
/* DATA STRUCTURES                                                       */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* FUNCTIONS                                                             */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* DEPENDENCIES                                                          */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*         NAME            DATE                    REMARKS               */
/*                                                                       */
/*                                                                       */
/*************************************************************************/

#define numDisplays 8	/* Number of supported display devices */

typedef struct _DBPstruc{	/* Display Bank Parameter Structure		*/
	byte wnType;				/* hardware window type				*/
	long wnSize;				/* scan lines/bank					*/
	long wnOff;					/* offset to second hardware window	*/
	int (*bnkMgr)();			/* offset of bank manager			*/
	void (*plnMgr)();			/* offset of plane manager			*/
	void (*altMgr)();			/* offset of alt plane manager		*/
} DBPstruc;

typedef struct _DspDevc{	/* Display Device Structure				*/
	int devcName;				/* Name of device					*/
	DBPstruc *bnkTblPtr;		/* Pointer to bank manager table	*/
	int (*devTblPtr)();			/* Pointer to device driver table	*/
} DspDevc;
extern DspDevc displayTable[numDisplays];

#define hasAltMgr	0x80	/* high bit of wnType indicates altmgr */

/*-------- Device Bank and Plane Parameter Tables start here  --------*/
extern DBPstruc tLCD;			/* 8-bit LCD */
extern DBPstruc tLCD1;			/* 1-bit LCD */
extern DBPstruc tLCD2;			/* 2-bit LCD */
extern DBPstruc tLCD4;			/* 4-bit LCD */

/* Internal Input Device Managers */
extern long mwIdevTbl[16];
	
/* Bank & plane manager function prototypes */
int BankStub();
void PlaneStub();

/* Device manager function prototypes */
int DevStub();
int	dLCD();

/* LCD register address defines */
#define LSSA	0xfa00  /* LCD Screen Starting Address Register */
#define LVPW	0xfa05  /* LCD Virtual Page Width Register */
#define LXMAX	0xfa08  /* LCD Screen Width Register */
#define LYMAX	0xfa0a  /* LCD Screen Height Register */
#define LCXP	0xfa18  /* LCD Cursor X Position Register */
#define LCYP	0xfa1a  /* LCD Cursor Y Position Register */
#define LCWCH	0xfa1c  /* LCD Cursor Width and Height Register */
#define LBLKC	0xfa1f  /* LCD Blink Control Register */
#define LPICF	0xfa20  /* LCD Panel Interface Configuration Register */
#define LPOLCF	0xfa21  /* LCD Polarity Configuration Register */
#define LACDRC	0xfa23  /* LACD Rate Control Register */
#define LPXCD	0xfa25  /* LCD Pixel Clock Divider Register */
#define LCKCON	0xfa27  /* LCD Clocking Control Register */
#define LRRA	0xfa29  /* LCD Refresh Rate Adjustment Register */
#define LPOSR	0xfa2d  /* LCD Panning Offset Register */
#define LFRCM	0xfa31  /* LCD Frame Rate Control Modulation Register */
#define LGPMR	0xfa33  /* LCD Gray Palette Mapping Register */
#define PWMR	0xfa36  /* PWM Contrast Control Register*/
#define LCDBASE	0	/* LCD Base Address */

/* LCD register setting defines */

/* Settings for LPICF */
#define PBSIZ	0x08    /* Panel Bus Width 0x08==4bit 0x04==2bit 0x00==1bit */

/* Settings for LCKCON */
#define LCDON	0x80	/* Enable the LCD controkker */
#define LCDOFF	0x00	/* Disable the LCD controkker */
#define DWIDTH	0x00	/* Display Memory Width 0x40==8-bit bus 0x00==16-bit bus */
#define DWSX	0x02	/* Display Wait-State 0x00==One clock 0x01==Two clock ......0x0f==Sixteen clock */

/* Settings for PWMR */
#define SRCX	0x0000	/* Input Clock Source The PWM Counter */
#define CCPEN	0x0000	/* Contrast Control */
#define PWX	0x0000	/* Pulsw Width */

/* Settings for LACDRC */
#define ACDLST	0x00	/* Signal Source Select */
#define ACDX	0x00	/* Alternate Crystal Direction Control */

/* Settings for LPXCD */
#define PCDX	0x02	/* Pixel Clock Divider */

/* Settings for LRRA */
#define RRAX	0x0a	/* Refresh Rate Adjustment */

⌨️ 快捷键说明

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