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

📄 windrvr.h

📁 Atheros AP Test with Agilent N4010A source code
💻 H
📖 第 1 页 / 共 3 页
字号:
    LICENSE_USB = 0x8000000,    
};

enum 
{
    LICENSE_CPU_ALL = LICENSE_CPU3 | LICENSE_CPU2 | LICENSE_CPU1 | 
        LICENSE_CPU0,
    LICENSE_ALPHA = LICENSE_CPU1,
    LICENSE_X86 = LICENSE_CPU0,
    LICENSE_SPARC = LICENSE_CPU1 | LICENSE_CPU0,
};

typedef struct
{
    CHAR cLicense[100]; // buffer with license string to put
                        // if empty string then get current license setting 
                        // into dwLicense
    DWORD dwLicense;    // returns license settings: LICENSE_DEMO, LICENSE_LITE etc...
                        // if put license was unsuccessful (i.e. invalid license)
                        // then dwLicense will return 0.
} WD_LICENSE;

typedef struct 
{
    DWORD dwBusType;        // Bus Type: ISA, EISA, PCI, PCMCIA
    DWORD dwBusNum;         // Bus number
    DWORD dwSlotFunc;       // Slot number on Bus
} WD_BUS;

enum 
{ 
    WD_BUS_ISA = 1, 
    WD_BUS_EISA = 2, 
    WD_BUS_PCI = 5, 
    WD_BUS_PCMCIA = 8,
};

typedef enum 
{ 
    ITEM_NONE=0, 
    ITEM_INTERRUPT=1, 
    ITEM_MEMORY=2, 
    ITEM_IO=3, 
    ITEM_BUS=5,
} ITEM_TYPE;

typedef struct 
{
    DWORD item; // ITEM_TYPE
    DWORD fNotSharable;
    union
    {
        struct 
        { // ITEM_MEMORY
            DWORD dwPhysicalAddr;     // physical address on card
            DWORD dwBytes;            // address range
            DWORD dwTransAddr;        // returns the address to pass on to transfer commands
            DWORD dwUserDirectAddr;   // returns the address for direct user read/write
            DWORD dwCpuPhysicalAddr;  // returns the CPU physical address of card
        } Mem;
        struct
        { // ITEM_IO
            DWORD dwAddr;         // beginning of io address
            DWORD dwBytes;        // io range
        } IO;
        struct
        { // ITEM_INTERRUPT
            DWORD dwInterrupt;  // number of interrupt to install 
            DWORD dwOptions;    // interrupt options: INTERRUPT_LEVEL_SENSITIVE
            DWORD hInterrupt;   // returns the handle of the interrupt installed
        } Int;
        WD_BUS Bus; // ITEM_BUS
        struct
        {
            DWORD dw1;
            DWORD dw2;
            DWORD dw3;
            DWORD dw4;
            DWORD dw5;
        } Val;
    } I;
} WD_ITEMS;

enum { WD_CARD_ITEMS = 20 };

typedef struct 
{
    DWORD dwItems;
    WD_ITEMS Item[WD_CARD_ITEMS];
} WD_CARD;

typedef struct 
{
    WD_CARD Card;            // card to register
    DWORD fCheckLockOnly;    // only check if card is lockable, return hCard=1 if OK
    DWORD hCard;             // handle of card
} WD_CARD_REGISTER_V30;

typedef struct
{
    WD_CARD Card;           // card to register
    DWORD fCheckLockOnly;   // only check if card is lockable, return hCard=1 if OK
    DWORD hCard;            // handle of card
    DWORD dwOptions;        // should be zero
    CHAR cName[32];         // name of card
    CHAR cDescription[100]; // description
} WD_CARD_REGISTER;

enum { WD_PCI_CARDS = 30 };

typedef struct 
{
    DWORD dwBus;
    DWORD dwSlot;
    DWORD dwFunction;
} WD_PCI_SLOT;
typedef struct 
{
    DWORD dwVendorId;
    DWORD dwDeviceId;
} WD_PCI_ID;

typedef struct
{
    WD_PCI_ID searchId;     // if dwVendorId==0 - scan all vendor IDs
                            // if dwDeviceId==0 - scan all device IDs
    DWORD dwCards;          // number of cards found
    WD_PCI_ID cardId[WD_PCI_CARDS]; // VendorID & DeviceID of cards found
    WD_PCI_SLOT cardSlot[WD_PCI_CARDS]; // pci slot info of cards found
} WD_PCI_SCAN_CARDS;

typedef struct 
{
    WD_PCI_SLOT pciSlot;    // pci slot
    WD_CARD Card;           // get card parameters for pci slot
} WD_PCI_CARD_INFO;

typedef enum
{ 
    PCI_ACCESS_OK = 0, 
    PCI_ACCESS_ERROR = 1, 
    PCI_BAD_BUS = 2, 
    PCI_BAD_SLOT = 3,
} PCI_ACCESS_RESULT;

typedef struct 
{
    WD_PCI_SLOT pciSlot;    // pci bus, slot and function number
    PVOID       pBuffer;    // buffer for read/write
    DWORD       dwOffset;   // offset in pci configuration space to read/write from
    DWORD       dwBytes;    // bytes to read/write from/to buffer
                            // returns the number of bytes read/wrote
    DWORD       fIsRead;    // if 1 then read pci config, 0 write pci config
    DWORD       dwResult;   // PCI_ACCESS_RESULT
} WD_PCI_CONFIG_DUMP;

enum { WD_ISAPNP_CARDS = 16 };
enum { WD_ISAPNP_COMPATIBLE_IDS = 10 };
enum { WD_ISAPNP_COMP_ID_LENGTH = 7 }; // ISA compressed ID is 7 chars long
enum { WD_ISAPNP_ANSI_LENGTH = 32 }; // ISA ANSI ID is limited to 32 chars long
typedef CHAR WD_ISAPNP_COMP_ID[WD_ISAPNP_COMP_ID_LENGTH+1]; 
typedef CHAR WD_ISAPNP_ANSI[WD_ISAPNP_ANSI_LENGTH+1+3]; // add 3 bytes for DWORD alignment
typedef struct 
{
    WD_ISAPNP_COMP_ID cVendor; // Vendor ID
    DWORD dwSerial; // Serial number of card
} WD_ISAPNP_CARD_ID;

typedef struct 
{
    WD_ISAPNP_CARD_ID cardId;  // VendorID & serial number of cards found
    DWORD dwLogicalDevices;    // Logical devices on the card
    BYTE bPnPVersionMajor;     // ISA PnP version Major
    BYTE bPnPVersionMinor;     // ISA PnP version Minor
    BYTE bVendorVersionMajor;  // Vendor version Major
    BYTE bVendorVersionMinor;  // Vendor version Minor
    WD_ISAPNP_ANSI cIdent;     // Device identifier
} WD_ISAPNP_CARD;

typedef struct 
{
    WD_ISAPNP_CARD_ID searchId; // if searchId.cVendor[0]==0 - scan all vendor IDs
                                // if searchId.dwSerial==0 - scan all serial numbers
    DWORD dwCards;              // number of cards found
    WD_ISAPNP_CARD Card[WD_ISAPNP_CARDS]; // cards found
} WD_ISAPNP_SCAN_CARDS;

typedef struct 
{
    WD_ISAPNP_CARD_ID cardId;   // VendorID and serial number of card
    DWORD dwLogicalDevice;      // logical device in card
    WD_ISAPNP_COMP_ID cLogicalDeviceId; // logical device ID
    DWORD dwCompatibleDevices;  // number of compatible device IDs
    WD_ISAPNP_COMP_ID CompatibleDevice[WD_ISAPNP_COMPATIBLE_IDS]; // Compatible device IDs
    WD_ISAPNP_ANSI cIdent;      // Device identifier
    WD_CARD Card;               // get card parameters for the ISA PnP card
} WD_ISAPNP_CARD_INFO;

typedef enum 
{ 
    ISAPNP_ACCESS_OK = 0, 
    ISAPNP_ACCESS_ERROR = 1, 
    ISAPNP_BAD_ID = 2, 
} ISAPNP_ACCESS_RESULT;

typedef struct 
{
    WD_ISAPNP_CARD_ID cardId; // VendorID and serial number of card
    DWORD dwOffset;   // offset in ISA PnP configuration space to read/write from
    DWORD fIsRead;    // if 1 then read ISA PnP config, 0 write ISA PnP config
    BYTE  bData;      // result data of byte read/write
    DWORD dwResult;   // ISAPNP_ACCESS_RESULT
} WD_ISAPNP_CONFIG_DUMP;

// PCMCIA Card Services

// Extreme case - two PCMCIA slots and two multi-function (4 functions) cards
enum 
{ 
    WD_PCMCIA_CARDS = 8, 
    WD_PCMCIA_VERSION_LEN = 4, 
    WD_PCMCIA_MANUFACTURER_LEN = 48,
    WD_PCMCIA_PRODUCTNAME_LEN = 48, 
    WD_PCMCIA_MAX_SOCKET = 2,
    WD_PCMCIA_MAX_FUNCTION = 2, 
};

typedef struct 
{
    BYTE uSocket;      // Specifies the socket number (first socket is 0)
    BYTE uFunction;    // Specifies the function number (first function is 0)
    BYTE uPadding0;    // 2 bytes padding so structure will be 4 bytes aligned
    BYTE uPadding1;
} WD_PCMCIA_SLOT;

typedef struct 
{
    DWORD dwManufacturerId; // card manufacturer
    DWORD dwCardId;         // card type and model
} WD_PCMCIA_ID;

typedef struct 
{
    WD_PCMCIA_ID searchId;           // device ID to search for
    DWORD dwCards;                   // number of cards found
    WD_PCMCIA_ID cardId[WD_PCMCIA_CARDS]; // device IDs of cards found
    WD_PCMCIA_SLOT cardSlot[WD_PCMCIA_CARDS]; // pcmcia slot info of cards found
} WD_PCMCIA_SCAN_CARDS;

typedef struct 
{
    WD_PCMCIA_SLOT pcmciaSlot; // pcmcia slot
    WD_CARD Card;              // get card parameters for pcmcia slot
    CHAR cVersion[WD_PCMCIA_VERSION_LEN];
    CHAR cManufacturer[WD_PCMCIA_MANUFACTURER_LEN];
    CHAR cProductName[WD_PCMCIA_PRODUCTNAME_LEN];
    DWORD dwManufacturerId;    // card manufacturer
    DWORD dwCardId;            // card type and model
    DWORD dwFuncId;            // card function code
} WD_PCMCIA_CARD_INFO;

typedef struct 
{
    WD_PCMCIA_SLOT pcmciaSlot;    
    PVOID pBuffer;    // buffer for read/write
    DWORD dwOffset;   // offset in pcmcia configuration space to 
                      //    read/write from
    DWORD dwBytes;    // bytes to read/write from/to buffer
                      //    returns the number of bytes read/wrote
    DWORD fIsRead;    // if 1 then read pci config, 0 write pci config
    DWORD dwResult;   // PCMCIA_ACCESS_RESULT
} WD_PCMCIA_CONFIG_DUMP;

enum { SLEEP_NON_BUSY = 1 };
typedef struct 
{
    DWORD dwMicroSeconds; // Sleep time in Micro Seconds (1/1,000,000 Second)
    DWORD dwOptions;      // can be: SLEEP_NON_BUSY (10000 uSec +)
} WD_SLEEP;

typedef enum 
{ 
    D_OFF = 0, 
    D_ERROR = 1, 
    D_WARN = 2, 
    D_INFO = 3, 
    D_TRACE = 4
} DEBUG_LEVEL;

typedef enum 
{ 
    S_ALL = 0xffffffff, 
    S_IO = 0x8, 
    S_MEM = 0x10, 
    S_INT = 0x20, 
    S_PCI = 0x40,
    S_DMA = 0x80,

⌨️ 快捷键说明

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