hal_emb.c

来自「epson公司的一个关于s1d13706的低层驱动程序」· C语言 代码 · 共 82 行

C
82
字号
/*-------------------------------------------------------------------------
//
// File: hal_emb.c
// generic hal hardware interface routines for embedded targets
//
// Copyright (c) 2000, 2001 Epson Research and Development, Inc.
// All Rights Reserved.
//	
// this file performs minimal setup required, since most embedded
// targets address the display controller at fixed memory addresses
// stored in appcfg.h
//-----------------------------------------------------------------------*/

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

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

static const char Revision[] = "HAL_EMB.C=$Revision: 5 $";

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

volatile DWORD _RegLinearAddress;
volatile DWORD _DispLinearAddress;

/*-------------------------------------------------------------------------
//
// _InitPlat()
// 
//-----------------------------------------------------------------------*/

int _InitPlat(void)
   {
   _RegLinearAddress = 0;
   _DispLinearAddress = 0;

   return ERR_OK;
   }

/*-------------------------------------------------------------------------
//
// seGetLinearDisplayAddress()
//
//-----------------------------------------------------------------------*/

DWORD seGetLinearDisplayAddress(void)
   {
   /*
   ** If LINEAR_ADDRESSES_SUPPORTED is not available, then the user must
   ** call _WRITEXB(), _READXB() when using the linear address.
   */
#ifdef LINEAR_ADDRESSES_SUPPORTED
   return _DispLinearAddress;
#else
   return 0;
#endif
   }

/*-------------------------------------------------------------------------
//
// seGetLinearRegAddress()
//
//-----------------------------------------------------------------------*/

DWORD seGetLinearRegAddress(void)
   {
   /*
   ** If LINEAR_ADDRESSES_SUPPORTED is not available, then the user must
   ** call _WRITEXB(), _READXB() when using the linear address.
   */
#ifdef LINEAR_ADDRESSES_SUPPORTED
   return _RegLinearAddress;
#else
   return 0;
#endif
   }

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


⌨️ 快捷键说明

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