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

📄 pl010com.h

📁 EP931X系列的WinCE串口驱动源代码
💻 H
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft 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 LICENSE.RTF on your
// install media.
//
/*++
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.

Module Name:  
   SER_PDD.h
   
Abstract:  
   Holds definitions for sample 16550  serial interface.
   
Notes: 
--*/
#ifndef __SER_PDD_H__   
    #define __SER_PDD_H__

    #ifdef __cplusplus
extern "C" {
    #endif

// TODO - Define PAGE_CONTAINING_UART
    #define PAGE_CONTAINING_UART   XXXXX

/*
 * @doc HWINTERNAL
 * @struct SER_INFO | Private structure.
 */

    typedef struct __SER_INFO {
// This is kind of gross - there are 16550 management vars in the SER16550_INFO
// structure that we want, but the regsiter pointers at the head of the struct
// don't apply to our layout.  As such, we'll insert a struture with these
// register pointers (and shadow variables).  This breaks some of the casting
// assumptions made in the stock serial PDD code.
//
        AMBA_UART_INFO serAMBA;
        SER16550_INFO  ser16550;

        // now hardware specific fields
        DWORD       dwIOBase;       // @field IO Base Address - unmapped
        DWORD       dwIOLen;        // @field IO Length
        DWORD       dwSysIntr;       // @field System Interrupt number for this peripheral
        DWORD       dwDevIndex;     // @field Index of device

        PUCHAR      pBaseAddress;   // @field Start of serial registers - mapped

        UINT8       cOpenCount;     // @field Count of concurrent opens
        COMMPROP    CommProp;       // @field Pointer to CommProp structure.
        PVOID       pMddHead;       // @field First arg to mdd callbacks.
        BOOL        fIRMode;        // @field Boolean, are we running in IR mode?
    #ifdef EXAMINE_BOOTARGS
        PBOOT_ARGS  pBootArgs;      // @field Pointer to global boot args struct
    #endif    
        PHWOBJ      pHWObj;         // @field Pointer to PDDs HWObj structure
    } SER_INFO, *PSER_INFO;


// Here are the names of the values stored in the registry
    #define PC_REG_SYSINTR_VAL_NAME TEXT("SysIntr") 
    #define PC_REG_SYSINTR_VAL_LEN  sizeof( DWORD )

    #define PC_REG_IOBASE_VAL_NAME TEXT("IoBase") 
    #define PC_REG_IOBASE_VAL_LEN  sizeof( DWORD )
    #define PC_REG_IOLEN_VAL_NAME TEXT("IoLen") 
    #define PC_REG_IOLEN_VAL_LEN  sizeof( DWORD )

    #define PC_REG_CONFIGBASE_VAL_NAME TEXT("ConfigBase") 
    #define PC_REG_CONFIGBASE_VAL_LEN  sizeof( DWORD )
    #define PC_REG_CONFIGLEN_VAL_NAME TEXT("ConfigLen") 
    #define PC_REG_CONFIGLEN_VAL_LEN  sizeof( DWORD )

    #define PC_REG_DMA_VAL_NAME TEXT("DMA") 
    #define PC_REG_DMA_VAL_LEN  sizeof( DWORD )

    #define PC_REG_DEVINDEX_VAL_NAME TEXT("DeviceArrayIndex") 
    #define PC_REG_DEVINDEX_VAL_LEN  sizeof( DWORD )
    #define UART1_INDEX     0
    #define UART2_INDEX     1
    #define UART3_INDEX     2

    #ifdef __cplusplus
}
    #endif



#endif __SER_PDD_H__

⌨️ 快捷键说明

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