xrpci.h

来自「wince 5.0下 实现PCI8串口卡驱动」· C头文件 代码 · 共 52 行

H
52
字号
//
// Copyright (c) 2005 Exar Corporation.  All rights reserved.
//

/*++


Module Name:

    xrpci.h

Abstract:

    Exar PCI UART card enumerator device driver

Notes:

	This driver loads to any of the Exar PCI cards (0x158/154/152 PIDs) and 
	enumerates each port on the card with the proper Memory and interrupt
	resources. This can be considered as a Bus Driver for the card.

--*/

#define MAX_PORTS	10 // max 10 can be supported as COM1 - COM10 ; even in this only 9 as COM1 is always built in?

typedef struct __XRPCI_INFO 
{
    // hardware specific fields
    DWORD       dwInterfaceType;   // @filed IO Interface (bus) type
	DWORD       dwBusNumber;		// @field PCI bus number.
    DWORD       dwMemBase;          // @field Memory Base Address - unmapped
    DWORD       dwMemLen;           // @field Memory Length
	DWORD		dwIrq;				// IRQ associated with the device
    DWORD       dwSysIntr;         // @field System Interrupt number for this peripheral
    DWORD       dwDevIndex;        // @field Index of device        
	DWORD       dwDeviceId;        // EXAR PCI device ID - 0x158/0x154/0x154
	DWORD		dwTotalPortsActivated;
	HANDLE		hDevice[MAX_PORTS];

} XRPCI_INFO, *PXRPCI_INFO;


// Here are the names of the values stored in the registry
#define PC_REG_DEVINDEX_VAL_NAME TEXT("DeviceArrayIndex") 
#define PC_REG_DEVINDEX_VAL_LEN  sizeof( DWORD )
#define PC_REG_REGSTRIDE_VAL_NAME TEXT("RegStride")
#define PC_REG_REGSTRIDE_VAL_LEN  sizeof( DWORD )


BOOL
XRPCI_GetRegistryData(PXRPCI_INFO pHWHead, LPCTSTR regKeyPath);

⌨️ 快捷键说明

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