?? hal.c
字號:
/*
**===========================================================================
** HAL.C
**---------------------------------------------------------------------------
** Copyright (c) 1997, 2001 Epson Research and Development, Inc.
** All Rights Reserved.
**===========================================================================
*/
#if defined(INTEL_W32) || defined(INTEL_DOS)
#include <stdio.h>
#endif
#include "hal.h"
#include "assert.h"
#include "nonsefns.h"
/*-----------------------------------------------------------------------*/
static const char Revision[] = "HAL.C=$Revision: 33 $";
/*-----------------------------------------------------------------------*/
static const char szHalVersion[] = " 13506 HAL Version ";
static const char szVersion[SIZE_VERSION] = "2.12";
static const char szStatus[SIZE_STATUS] = "";
#ifdef INTEL_DOS
static const char szRevision[SIZE_REVISION] = "-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 13506 then check for the revision.
*/
if (0x10 == (val & 0xFC))
{
switch (val & 0x03)
{
case 0:
*pId = ID_S1D13506_REV0;
return ERR_OK;
case 1:
*pId = ID_S1D13506_REV1;
return ERR_OK;
default:
*pId = ID_UNKNOWN;
return ERR_UNKNOWN_DEVICE;
}
}
*pId = ID_UNKNOWN;
return ERR_UNKNOWN_DEVICE;
}
/*-------------------------------------------------------------------------*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -