drv_glob.h

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

H
123
字号
/* -*-C-*-
 *
 * $Revision: 1.6 $
 *   $Author: kwelton $
 *     $Date: 2000/05/10 21:35:30 $
 *
 * 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.
 *
 * Copyright (c) 1995, 1996, 1997, 1998  Microsoft Corporation
 * Copyright (c) 1999 ARM Limited
 * All Rights Reserved
 */
/*++

Module Name:  

    drv_glob.h

Abstract:  

    This file provides the C definitions for the driver globals area of
    shared memory, used to coordinate between ISRs and ISTs.

--*/
#ifndef integrator_drv_glob_h
#define integrator_drv_glob_h

#include "armintboot.h"
#include "board.h"

#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  (VA_RAM_BASE + 0x8000)
#define DRIVER_GLOBALS_PHYSICAL_MEMORY_SIZE   0x1000  // 4K

// 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

/*
 * Memory for the debug ethernet buffer pools.
 *
 * NOTE
 *
 * This matches the ETHPOOL declaration in config.bib
 */
#define ETHPOOL_MEMORY_BASE     (VA_RAM_BASE + 0x9000)

// don't include all the c stuff for fw_platform.s
#ifndef ASM_ONLY

#include <halether.h>

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

// For timing interrupt latency
typedef struct _PROFILE_GLOBALS {
    ULONG itIndex;                      // index of timer interrupt (log[0])
    ULONG itCounter;            // counter at isr start (log[1])
    ULONG itSpc;                        // saved stack pointer (log[2])
    PAD(0,244);                 // Pad to 256 bytes
} PROFILE_GLOBALS, *PPROFILE_GLOBALS;

// Miscellaneous
typedef struct _MISC_GLOBALS {
    UCHAR offButton;        // Indicate to keyboard driver when OFF button pressed
    PAD(0,255);
} MISC_GLOBALS, *PMISC_GLOBALS;

//------------------------------------------------------------------------------
//
// Bootloader parameters passed to the image.
//
//------------------------------------------------------------------------------

typedef struct _DRIVER_GLOBALS
{
    PCMCIA_GLOBALS   pcm;    // Offset 0
    PROFILE_GLOBALS  prof;   // Offset 0x100
    MISC_GLOBALS     misc;   // Offset 0x200
    PAD(0,0x500);
    // The following structs will not be zero initialized (see defs above)
    HARP_BOOT_ARGS   eth;    // Offset 0x800
} DRIVER_GLOBALS, *PDRIVER_GLOBALS;
#endif //not ASM_ONLY

// And some defs to match above struct
#define TOUCHPANEL_PENSAMPLES_BUFA  (DRIVER_GLOBALS_PHYSICAL_MEMORY_START)
#define TOUCHPANEL_PENSAMPLES_BUFB  (DRIVER_GLOBALS_PHYSICAL_MEMORY_START + 0x10)

// Add pointer to off button flag
#ifdef MIPS
#define  MISC_GLOBALS_BASE          (DRIVER_GLOBALS_PHYSICAL_MEMORY_START + 0x300)       
#define  OFFBUTTON                  0
#endif

#ifndef ASM_ONLY
#pragma pack()

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

#endif // _DRV_GLOB_H

⌨️ 快捷键说明

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