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

📄 hal.c

📁 epson公司的一个关于s1d13706的低层驱动程序
💻 C
字号:
/*
**===========================================================================
** HAL.C
**---------------------------------------------------------------------------
** Copyright (c) 2000, 2001 Epson Research and Development, Inc.
** All Rights Reserved.
**===========================================================================
*/

#include "hal.h"
#include "assert.h"
#include "nonsefns.h"

/*-----------------------------------------------------------------------*/

static const char Revision[] = "HAL.C=$Revision: 21 $";

/*-----------------------------------------------------------------------*/

static const char szHalVersion[] = " 13706 HAL Version ";
static const char szVersion[SIZE_VERSION]    = "1.05";
static const char szStatus[SIZE_STATUS]      = "";

#ifdef INTEL_DOS
static const char szRevision[SIZE_REVISION]  = "-D";  // -DOS
#else
static const char szRevision[SIZE_REVISION]  = "";
#endif

LPHAL_STRUCT _HalInfo;

/*-----------------------------------------------------------------------*/

/*
**	seGetHalVersion()
**
**	This routine returns the HAL version, the release status and
**	the release status version.
*/
void seGetHalVersion( const char **pVersion, const char **pStatus, const char **pRevision )
{
	*pVersion  = szVersion;
	*pStatus   = szStatus;
	*pRevision = szRevision;
}

/*-----------------------------------------------------------------------*/

/*
**	seGetID()
**
**	This routine reads the 13XX revision code register and determines the 
**	video controller.
**
**	Currently there is no need to differentiate between chip revisions.
*/
int seGetId(int *pId)
{
	unsigned val;

	val = seReadRegByte(REG_REVISION_CODE);

	/*
	** If this is a 13706 then check for the revision.
	*/
	if (0x28 == (val & 0xFC))
   	{
      *pId = val & 0x03;
      return ERR_OK;
   	}
   else
      {
   	*pId = 0;
   	return ERR_UNKNOWN_DEVICE;
      }
}

/*-------------------------------------------------------------------------*/

⌨️ 快捷键说明

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