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

📄 drv_glob.h

📁 CIRRUS 公司EP93XX系列CPU的WINCE下的BSP
💻 H
字号:
//**********************************************************************
//                                                                      
// Filename: drv_glob.h
//                                                                      
// Description: Description of the global data area.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Use of this source code is subject to the terms of the Cirrus end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to 
// use this source code. For a copy of the EULA, please see the 
// EULA.RTF on your install media.
//
// Copyright(c) Cirrus Logic Corporation 2002, All Rights Reserved                       
//                                                                      
//**********************************************************************
#ifndef _DRV_GLOB_H
#define _DRV_GLOB_H

// Ethernet debug defs
#include "halether.h"  

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


#define VMEMSTRT 0x80000000

//
// Make sure these match up with the defs in config.bib, and drv_glob.inc
//
#define DRIVER_GLOBALS_MEMORY_SIZE              0x1000 

//
// In OEMInit, we zero out the region specified by the following defs
//
#define DRIVER_GLOBALS_ZEROINIT_START           DRIVER_GLOBALS_PHYSICAL_MEMORY_START
#define DRIVER_GLOBALS_ZEROINIT_SIZE            0x800


//
// 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      // "EBOT"
#define PARALLEL_MAGIC_NUM 0x50415241   // "PARA"
    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);
//    USHORT      MacAddress[3];          // The current board doesn't have a eeprom to
//                                        // store the mac address.  This is now eboot dependant.

    DWORD       EbootdbgZone;           // Allows EDBG debug zones to be turned on 
                                        // from loadcepc.

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

    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   EshellHostAddr;         // IP/ether addr and UDP port of host running eshell.
    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
    DWORD       EdbgHardwareType;      
    char        strEdbgName[EDBG_MAX_DEV_NAMELEN];
    UCHAR       fmtBuf[176];
} DBG_ETH_GLOBALS, *PDBG_ETH_GLOBALS;




//#define     EDBG_TYPE_CS8950         1
//#define     EDBG_TYPE_NE2000         2

//
// Driver Globals structure.
//
typedef struct  _DRIVER_GLOBALS
{
    PAD(0,0x800);
    
    //
    // The following structs will not be zero initialized (see defs above)
    //
    DBG_ETH_GLOBALS  eth;    // Offset 0x800

    //PAD(1,0x10);
    
    //
    // Global Audio memory area.
    //
    //volatile AUDIO_GLOBALS    Audio;
    
} DRIVER_GLOBALS, *PDRIVER_GLOBALS;

#define DRIVER_GLOBALS_POINTER      ((DRIVER_GLOBALS *)DRIVER_GLOBALS_VIRTUAL_MEMORY)
#define DBG_ETH_GLOBALS_SIZE        sizeof(DRIVER_GLOBALS)


//
// We need to make a definition for the Ethernet adapter hardware type.
//
#define EDBG_ADAPTER_CS8950         (EDBG_ADAPTER_OEM + 2)


#define pDriverGlobals      ((PDRIVER_GLOBALS) DRIVER_GLOBALS_VIRTUAL_MEMORY)

#define PIO_AUDIO_BUFFER_SIZE       4096

//
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -