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

📄 siddkapi_win.h

📁 The PCI Local bus concept was developed to break the PC data I/O bottleneck and clearly opens the d
💻 H
字号:
// SIDDKAPI.h
// This file needs to be included with the driver and with all calling applications
// which use the DeviceIOControl() WIN32 interface to the SI-DDK PCI Driver

#ifndef CTL_CODE
#pragma message(" ")
#pragma message("CTL_CODE undefined. Using the code copied from winioctl.h (or devioctl.h).")
#pragma message("If you are compiling for WDM, include winioctl.h or devioctl.h before this file.")
#pragma message(" ")

// These are all taken from DEVIOCTL.H

#define FILE_DEVICE_UNKNOWN             0x00000022

//
// Macro definition for defining IOCTL and FSCTL function control codes.  Note
// that function codes 0-2047 are reserved for Microsoft Corporation, and
// 2048-4095 are reserved for customers.
//

#define CTL_CODE( DeviceType, Function, Method, Access ) (                 \
    ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
)

//
// Define the method codes for how buffers are passed for I/O and FS controls
//

#define METHOD_BUFFERED                 0
#define METHOD_IN_DIRECT                1
#define METHOD_OUT_DIRECT               2
#define METHOD_NEITHER                  3

//
// Define the access check value for any access
//
//
// The FILE_READ_ACCESS and FILE_WRITE_ACCESS constants are also defined in
// ntioapi.h as FILE_READ_DATA and FILE_WRITE_DATA. The values for these
// constants *MUST* always be in sync.
//

#define FILE_ANY_ACCESS                 0
#define FILE_READ_ACCESS          ( 0x0001 )
#define FILE_WRITE_ACCESS         ( 0x0002 )

#endif
//
// define the unified IOCTL codes
//

#define IOCTL_SHELDON_NVRAM_READ	CTL_CODE(	\
						FILE_DEVICE_UNKNOWN,	\
						0x809,					\
						METHOD_BUFFERED,		\
						FILE_ANY_ACCESS)


#define IOCTL_SHELDON_NVRAM_WRITE	CTL_CODE(	\
						FILE_DEVICE_UNKNOWN,	\
						0x80A,					\
						METHOD_BUFFERED,		\
						FILE_ANY_ACCESS)


#define IOCTL_SHELDON_CONFIG_READ	CTL_CODE(	\
						FILE_DEVICE_UNKNOWN,	\
						0x80B,					\
						METHOD_BUFFERED,		\
						FILE_ANY_ACCESS)

#define IOCTL_SHELDON_BUSMASTERED_READ	CTL_CODE(	\
						FILE_DEVICE_UNKNOWN,	\
						0x80D,					\
						METHOD_OUT_DIRECT,		\
						FILE_READ_ACCESS)

#define IOCTL_SHELDON_BUSMASTERED_WRITE	CTL_CODE(	\
						FILE_DEVICE_UNKNOWN,	\
						0x80E,					\
						METHOD_IN_DIRECT,		\
						FILE_WRITE_ACCESS)

#define IOCTL_SHELDON_RELEASE_BADDR	CTL_CODE(	\
						FILE_DEVICE_UNKNOWN,	\
						0x825,					\
						METHOD_BUFFERED,		\
						FILE_ANY_ACCESS)

// End: Chipset Optional defines

//// Begin: OS Optional defines
////		these are only for Windows 95 and are not needed under NT
////		However, NT does have dummy functions, so these calls are harmless
#define IOCTL_SHELDON_NUMBER_OF_BOARDS	CTL_CODE(	\
						FILE_DEVICE_UNKNOWN,	\
						0x810,					\
						METHOD_BUFFERED,		\
						FILE_ANY_ACCESS)

#define IOCTL_SHELDON_REGISTER_NEW_BOARD CTL_CODE(	\
						FILE_DEVICE_UNKNOWN,	\
						0x811,					\
						METHOD_BUFFERED,		\
						FILE_ANY_ACCESS)

// End: OS Optional defines

// The following defines specify the array index of information passed
// to and from the driver in an array of 32 bit numbers

#define SI_CONFIG_READ_TOSIZE			2*sizeof(ULONG)
#define SI_CONFIG_READ_FROMSIZE			0

#define SI_CONFIG_OFFSET_INDEX			0
#define SI_CONFIG_COUNT_INDEX			1
#define SI_CONFIG_READ_DATA_INDEX		0

#define SI_NV_OFFSET_INDEX				0
#define SI_NV_READ_TOSIZE				1*sizeof(ULONG)
#define SI_NV_READ_FROMSIZE				1*sizeof(ULONG)
#define SI_NV_READ_DATA_INDEX			0
#define SI_NV_WRITE_TOSIZE				2*sizeof(ULONG)
#define SI_NV_WRITE_FROMSIZE			0
#define SI_NV_WRITE_DATA_INDEX			1

// This value is in miliseconds and should be the same as one page in Version 1.2
// Set INITIAL TIMEOUT to zero to disable timeout
#define INITIAL_TIMEOUT					5096

⌨️ 快捷键说明

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