drv_glob.h

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

H
122
字号
/*

  Copyright(c) 1998,1999 SIC/Hitachi,Ltd.

	Module Name:

		drv_glob.h

	Revision History:

		26th April 1999		Released
		25th June  1999		Fixed minor bug
		30th June  1999		Modified audio buffer 

*/
#ifndef _DRV_GLOB_H
#define _DRV_GLOB_H

#include <halether.h>  // Ethernet debug defs
#pragma pack(1)

#define PAD(label,amt)  UCHAR Pad##label[amt]

// Make sure these match up with the defs in config.bib, and drv_glob.inc
#define DRIVER_GLOBALS_PHYSICAL_MEMORY_START  DRV_GLOBAL_BASE
#define DRIVER_GLOBALS_PHYSICAL_MEMORY_SIZE   0x1000  // 4K

// Audio globals.  
typedef struct _AUDIO_GLOBALS 
{
	// Used to let HAL know which level ints are enabled.
	DWORD  play_address;   
	USHORT outInt;
	USHORT dammy;
	DWORD  play_pointer;		//for TMU2
	DWORD  rec_address;
	USHORT inInt;
	PAD(0,238);          // Pad to 256 bytes
    
} AUDIO_GLOBALS, *PAUDIO_GLOBALS;

// PCMCIA globals.  
typedef struct _PCMCIA_GLOBALS 
{
	// Used to let HAL know which level ints are enabled.
	USHORT slot0Enable;   
	USHORT slot1Enable;
	PAD(0,252);          // Pad to 256 bytes
    
} PCMCIA_GLOBALS, *PPCMCIA_GLOBALS;

// For debugging over ethernet. Controls debug messages, ethernet shell
// and kernel debugger.  Note that this struct should not be zeroed
// out by OEMInit, as the eboot bootloader passes us state info.
typedef struct _DBG_ETH_GLOBALS 
{
	DWORD EbootMagicNum;			// To detect if ether bootloader is present
#define EBOOT_MAGIC_NUM 0x45424F54	// "EBOOT"

	UCHAR etherEnabled;				// If non-zero, ethernet card present
	UCHAR etherFlags;				// Set by eboot loader. Controls which components are enabled over ether (see ethdbg.h)
	PAD(0,2);

	EDBG_ADDR PlatformAddr;				// IP and ether address of Odo
	DWORD SubnetMask;				// Subnet mask

	EDBG_ADDR DownloadHostAddr;		// IP and ether address of host who started us

	// The following addresses are assumed valid if the corresponding flag in
	// etherFlags is set.
	EDBG_ADDR DbgHostAddr;			// IP/ether addr and UDP port of host receiving dbg msgs
	EDBG_ADDR KdbgHostAddr;			// IP/ether addr and UDP port of host running kernel debugger
	EDBG_ADDR PpshHostAddr;			// IP/ether addr and UDP port of host running ether text shell
    DWORD DHCPLeaseTime;     // DHCP lease duration in seconds.
    DWORD EdbgFlags;         // Information about ethernet system

	UCHAR fmtBuf[176];				// Tx Buffer for debug messages (ASCII)
} DBG_ETH_GLOBALS, *PDBG_ETH_GLOBALS;

#define DBG_ETH_GLOBALS_SIZE 256

typedef struct _DRIVER_GLOBALS
{
	AUDIO_GLOBALS	aud;			// Offset 0x000
	PCMCIA_GLOBALS	pcm;			// Offset 0x100
	// The following structs will not be zero initialized (see defs above)
	DBG_ETH_GLOBALS  eth;			// Offset 0x200
	PAD(0, 0x600);
} DRIVER_GLOBALS, *PDRIVER_GLOBALS;

// Video definitions
#define DISPLAY_CURSOR_BACKUP_OFFSET			0x8000   
#define DISPLAY_CURSOR_BACKUP_BASE				(DRAM_BASE + DISPLAY_CURSOR_BACKUP_OFFSET)

// Audio definitions
#define AUDIO_BUFFER_OFFSET			0x50000   
#define AUDIO_BUFFER_BASE			(DRAM_BASE + AUDIO_BUFFER_OFFSET)  

//Play Buffer
#define AUDIO_DMA_PAGE_SIZE			0x18000

//Record Buffer
#define AUDIO_BUFFER_REC_BASE			(DRAM_BASE + AUDIO_BUFFER_OFFSET + AUDIO_DMA_PAGE_SIZE + AUDIO_DMA_PAGE_SIZE )
#define AUDIO_DMA_PAGE_REC_SIZE			0x18000

// EDBG definitions
#define EDBG_PHYSICAL_MEMORY_START	(DRAM_BASE+0x30000)

// Add pointer to off button flag
#pragma pack()

// Prototype functions from drvlib
#ifdef __cplusplus
extern "C" {
#endif
void DriverSleep(DWORD dwMS, BOOL bInPowerHandler);
#ifdef __cplusplus
}
#endif

#endif // _DRV_GLOB_H

⌨️ 快捷键说明

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