atihap.h

来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· C头文件 代码 · 共 239 行

H
239
字号
/*****************************************************************************
  
File:     ATIHAP.H
Purpose:  Defines a generic C/C++ interface to ATI Rage Hardware

Author:   Mark Vrabel
          EA/Software Group				 
          ATI Research Inc.
          Copyrighted 1998. All Rights Reserved.

****************************************************************************** 

******************************************************************************

Last Modification Date : August 19, 1998

*****************************************************************************/

#ifndef _INC_ATIHAP
#define _INC_ATIHAP

#include "biosinfo.h"
#include "phx2dinf.h"
#include "i2cgpio.h"
#include "atiirq.h"
#include "ar_dc.h"


#ifdef __cplusplus
extern "C" {
#endif


//
// Hardware Access Initialization
//
// This group of functions perform opening and closing of access to 
// the ATI Hardware Access Provider.
//

//
// This function initializes initializes driver access to the hardware 
// and maintains an open count of the hardware. The first time 
// ATIHAP_InitHWAccess is called, the simulated BIOS initialization is 
// run and the initial display mode is set (currently hard coded to 
// 640x480 16bbp RGB565).
// 
// This function must be called at least once for each process accessing 
// the hardware before access to hardware is allowed for that process.
// 
// NOTE: the display drive should be the first driver to call ATIHAP_InitHWAccess().
//
HRESULT WINAPI ATIHAP_InitHWAccess();

//
// Closes drivers access to the hardware and decriments the open count. 
// When the open count is zero, resources associated with the hardware 
// are released.
//
// Each ATIInitAccess() call must be paired with a call to ATICloseHWAccess().
//
HRESULT WINAPI ATIHAP_CloseHWAccess();


//
// I2C Provider Access
//
// The I2C Provider will be responsible for providing access to devices 
// connected to the master I2C device. The master device sends commands 
// to the devices for setting and reading the properties of the devices.  
//

//	  
// This function opens or closes a channel for the client  to use when 
// communicating with the I2C bus. The client passes a flag, bAllocate, 
// indicating if the call is to open or close a channel, and a pointer to 
// a I2CControl structure. The I2CControl structure contains information 
// that the Hardware Access Provider needs to identify the channel and 
// process commands for the I2C bus. 
//
HRESULT WINAPI ATIHAP_I2COpen (BOOL bAllocate, PI2CControl pI2CCntl);

//
// This function sends and receives data using the I2C bus.  Its argument, 
// pI2CCntl is a pointer to the I2CControl structure used with ATIHAP_ I2COpen. 
// The Command member of the I2CControl structure indicates the action to take. 
//
HRESULT WINAPI ATIHAP_I2CAccess (PI2CControl pI2CCntl);


//
// Memory-Mapped Register Access
// This group of functions provides read/write access to the memory-mapped 
// registers of the ATI hardware.
//

//
// Returns the 8-bit value read from the register offset location regindex.
//
BYTE WINAPI ATIHAP_MMRegReadBYTE (DWORD regindex);

//
// Writes the 8-bit value regdata to register offset location regindex.
//
VOID WINAPI ATIHAP_MMRegWriteBYTE (DWORD regindex, BYTE regdata);

//
// Returns the 16-bit value read from the register offset location regindex.
//
WORD WINAPI ATIHAP_MMRegReadWORD (DWORD regindex);

//
// Writes the 16-bit value regdata to register offset location regindex.
//
VOID WINAPI ATIHAP_MMRegWriteWORD (DWORD regindex, WORD regdata);

//
// Returns the 32-bit value read from the register offset location regindex.
//
DWORD WINAPI ATIHAP_MMRegReadDWORD (DWORD regindex);

//
// Writes the 32-bit value regdata to register offset location regindex.
//
VOID WINAPI ATIHAP_MMRegWriteDWORD (DWORD regindex, DWORD regdata);


//
// Bios Simulation Access
//
// This function group provided basic informational services normally provided 
// through access to the video bios in other operation systems.
//

//
// Fills the address pointed to by hwInfo with the current 2D video hardware 
// information.
//
HRESULT WINAPI ATIHAP_SimBiosGetPhx2dInfo (PHX2DHWINFO *hwInfo);

//
// Fills the address pointed to by pMultiMediaInfo with the current multimedia 
// hardware information.  
HRESULT WINAPI ATIHAP_SimBiosGetMultiMediaInfo (BIOS_MULTIMEDIAINFO *pMultiMediaInfo, DWORD dwSize);

//
// Fills the address pointed to by pHardwareInfo with the current hardware 
// information.
//
HRESULT WINAPI ATIHAP_SimBiosGetHardwareInfo (BIOS_HARDWAREINFO *pHardwareInfo, DWORD dwSize);

//
// Fills the address pointed to by pFrequencyTable with the current Frequency Table 
// information. 
//
HRESULT WINAPI ATIHAP_SimBiosGetFrequencyTable (BIOS_CHIP_FREQUENCY_TABLE *pFrequencyTable, DWORD dwSize);

//
// Fills the address pointed to by pTVOutInfo with the current TV-Out hardware 
// information.  
//
HRESULT WINAPI ATIHAP_SimBiosGetTVOutInfo (BIOS_TVOUTINFO *pTVOutInfo, DWORD dwSize);

//
// Fills the address pointed to by pModeInfo o with the current video mode 
// information.  
//
HRESULT WINAPI ATIHAP_SimBiosGetModeInfo (BIOS_MODEINFO *pModeInfo, DWORD dwSize);

//
// This function returns TRUE if the current hardware configuration supports 
// TV-Out functionality, FALSE if it does not;
//
BOOL WINAPI ATIHAP_SimBiosIsTVOutSupported ();

//
// This function should be called with fLock = TRUE when attempting to use 
// the hardware's overlay capabilities.  It will return an error if the 
// overlay engine is in use by another process or thread.  When finished with 
// the overlay engine, call this function with fLock = FALSE to allow other 
// processes or thread to access it.
//
HRESULT WINAPI ATIHAP_SimBiosLockOverlay (BOOL fLock);

//
// This function should be called with fLock = TRUE when attempting to use 
// the hardware's AMC connector.  It will return an error if the AMC connector 
// is in use by another process or thread.  When finished with the AMC connector, 
// call this function with fLock = FALSE to allow other processes or thread to 
// access it.
//
HRESULT WINAPI ATIHAP_SimBiosLockConnector (BOOL fLock);

//
// NOTE: The following SimBios functions are not currently 
// implimented...
//
HRESULT WINAPI ATIHAP_SimBiosRegisterModeSwitchCallback(MODESWITCHCALLBACK lpfnCallback, LPVOID lpCallbackData);
HRESULT WINAPI ATIHAP_SimBiosUnregisterModeSwitchCallback();
HRESULT WINAPI ATIHAP_SimBiosGetMaxCaptureSize(BIOS_VIDEOCAPTUREDATA *pVideoCaptureData, DWORD dwSize);
HRESULT WINAPI ATIHAP_SimBiosCaptureEngineEnable(BOOL fEnable, BIOS_VIDEOCAPTUREDATA *pVideoCaptureData, DWORD dwSize);
// End NOTE


//
// IRQ Manager Access
//
// The IRQ Manager (IM) will be responsible for virtualizing the IRQ, managing 
// the IRQ and its resources, exposing a comprehensive API with which client 
// drivers may be informed of pending interrupts and coordinating IRQ usage between 
// multiple IRQ Client drivers.


//
// This function provides access to the IRQ Manager via a pointer to the IRQControl  
// pIRQCntl and a command interface. 
//
HRESULT WINAPI ATIHAP_IRQAccess (PIRQControl pIRQCntl);


//
// Contiguous Memory Access
//

//
// NOTE: The following ContiguousMemory functions are not currently 
// implimented...
//
HRESULT WINAPI ATIHAP_ContiguousMemoryReserve (DWORD dwSize, LPVOID *pAddress, DWORD *pPhysical);
HRESULT WINAPI ATIHAP_ContiguousMemoryRelease (LPVOID pAddress);
// End NOTE


#ifdef __cplusplus
}
#endif


#endif _INC_ATIHAP

⌨️ 快捷键说明

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