亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pci.h

?? 相機傳輸圖像程序源代碼 拜耳模式(RAW格式文件)與RGB圖像數據互相轉換函數庫
?? H
字號:
//=====================================================================
//[HEADER] PCI
// PCIBios and PCIDevice class definitions
//+
//[AUTHOR]
// Bruno Rivara
//.



#ifndef ___PCI_H
#define ___PCI_H

#include <lvdef.h>

#ifndef _MSC_VER
    #ifndef _Windows
        #ifndef __UNIX__
            #include <stdio.h>
            typedef unsigned int  BOOL;
            typedef unsigned int  WORD;
            typedef unsigned long LONG;
            typedef unsigned long DWORD;
            #ifndef FAR
                #define FAR  _far
            #endif
        #else
            #include <windows.h>
        #endif

        #define LOBYTE(w)           ((U8BIT)(w))
        #define HIBYTE(w)           ((U8BIT)((U16BIT)(w) >> 8))

        #define LOWORD(l)           ((U16BIT)(l))
        #define HIWORD(l)           ((U16BIT)((DWORD)(l) >> 16))

        #ifndef TRUE
            #define TRUE  1
            #define FALSE 0
        #endif // TRUE
    #endif // _Windows
#endif // _MSC_VER

#include <pcicfg.h>


#define PCICMD_ENABLE_IO        0x01
#define PCICMD_DISABLE_IO       0x02
#define PCICMD_ENABLE_MEM       0x03
#define PCICMD_DISABLE_MEM      0x04
#define PCICMD_ENABLE_PAL       0x05
#define PCICMD_DISABLE_PAL      0x06

#define PCICMD_ENABLE_IOMEMPAL  0x10
#define PCICMD_DISABLE_IOMEMPAL 0x11

#define PCI_FUNCTION_ID         0xB1
#define PCI_BIOS_PRESENT        0x01
#define FIND_PCI_DEVICE         0x02
#define FIND_PCI_CLASS_CODE     0x03
#define READ_CONFIG_BYTE        0x08
#define READ_CONFIG_WORD        0x09
#define READ_CONFIG_DWORD       0x0A
#define WRITE_CONFIG_BYTE       0x0B
#define WRITE_CONFIG_WORD       0x0C
#define WRITE_CONFIG_DWORD      0x0D
#define GET_IRQ_ROUTING_OPTIONS 0x0E

#include <lvpackon.h>

class PCIBios;


// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
//[CLASS] PCIDevice
// Class representing PCI devices
//+
//[DESCRIPTION]
// PCIDevice represents a generic PCI device that was found on the system by the PCIBios class.
// No assumption should be made about the 'graphic' nature of the PCIDevice object.
// This class provides query functions to identify the device it represents; it also provides methods to enable
//& and disable (always from the PCI point of view) the device.
// Since this class is one of the base classes for the LvMainBoard class all objects of this class inherit the
//& PCI interface.
//.

class PCIDevice {
    private:
    protected:

        PCIBios *TheBios;    // May be global since just one is allowed
                             // (in this way we have no reference to the outside world)
        PCICfgSpace Config;
        U8BIT *FullConfig;
        U8BIT BusNr;
        U8BIT DevNr;
        U8BIT FnNr;
        void DisableOnly(void);
        int PciId;
        #if defined(__WIN3264__) || defined(__UNIX__)
        DRVHANDLE DriverHandle;
        BOOL OriginalOpen;
        #endif

        // void ReadConfigField(U16BIT Address, U16BIT *Value, U8BIT Size);
        // void WriteConfigField(U16BIT Address, U16BIT *Value, U8BIT Size);
    public:
        virtual BOOL ReadConfig(void);

        PCIDevice(PCIDevice *aPCIDevice);
        PCIDevice(PCIBios *aBios, U8BIT BusNr, U8BIT DevNr, U8BIT FnNr, int aPciId=0);
        ~PCIDevice(void);

        U8BIT GetPCIBusNr(void) { return BusNr; }
        U8BIT GetPCIDeviceNr(void) { return DevNr; }
        U8BIT GetPCIFnNr(void) { return FnNr; }
        PCIBios *GetPCIBios(void) { return TheBios; }

        U16BIT GetVendorId(void) { return Config.VendorId; }
        U16BIT GetDeviceId(void) { return Config.DeviceId; }
        U32BIT GetROMBaseAddress(void) { return Config.ROMBaseAddress; }
        U32BIT GetBaseAddress(int Index) { return Config.BaseAddress[Index]+GetBaseOffset(Index); }

        U8BIT ReadCfgField(U8BIT Offset, U32BIT *Buffer, U8BIT Operation);
        U8BIT WriteCfgField(U8BIT Offset, U32BIT Buffer, U8BIT Operation);

        virtual U32BIT GetBaseOffset(int Index) { return 0; }
        void FillPCIDeviceDescriptor(PCICfgSpace *Dev);
        void FillPCIDeviceDescriptorEx(U8BIT *Dev);

        void EnableIOAccess(void);
        void DisableIOAccess(void);

        void EnableMemAccess(void);
        void DisableMemAccess(void);

        void EnablePalAccess(void);
        void DisablePalAccess(void);

        void Enable(void);
        void Disable(void);

        void EnableROM(void);
        void DisableROM(void);
        virtual void WakeUp(void) {}

        BOOL IsActive(void);

        BOOL IsVGACompatible(void) { return (Config.ClassCode.Base==0 && Config.ClassCode.Sub==1) || Config.ClassCode.Base==3; }
        BOOL IsMultimedia(void)    { return (Config.ClassCode.Base==4 && Config.ClassCode.Sub!=1); }

        BOOL IsMultiDevice(void)    { return (Config.HeaderType & 0x80)!=0; }

        int VgaNr(void);

        #if defined(__WIN3264__) || defined(__UNIX__)
        char *GetWin32DeviceName(char *Buffer);
        #endif

    friend class LvPCIChip;
    friend int operator ==(const PCIDevice& D1, const PCIDevice& D2);
    };

//-[CLASS] PCIDevice

// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
//[CLASS] PCIBios
// Class representing PCI Bios
//+
//[DESCRIPTION]
// PCIBios represents the PCI bios of the system; all the accesses to the Bios should be made through objects of this
//& class; it provides 'automatic' detection of PCI bios and collection of PCI information as well as rules to determine
//& the presence of PCI devices in the system.
// There should be just one object of this class per application, created on startup.
// When the object is created it checks for the presence of a PCI bios then, if found, scans the busses to identify
//& the PCI devices eventually installed in the system.
//.
//[LVSTATUS]
// The actual implementation was taken by the 'old' code from Felix. All the methods should be rewritten in a better way.
// To be done: providing memory access if the bios allows it (we are in protected mode)
//.
class PCIBios {
    private:
        BOOL Present;
        U8BIT NrDevice;

        U8BIT HwMechanism;
        U16BIT Version;
        U8BIT LastBus;

        BOOL CheckPresence(void);
        void GetIrqRoutingOptions(void);
        PCIDevice *ActiveVGA;
        PCIDevice *SystemActiveVGA;

        HANDLE hPciOut;

    protected:

        PCIDevice **pDevice;
        // PCIDevice *SetActiveVGA(PCIDevice *NewActiveVGA) { PCIDevice *Tmp=ActiveVGA; ActiveVGA=NewActiveVGA; return Tmp; }
        #if defined(__WIN3264__) || defined(__UNIX__)
        DRVHANDLE OpenDriver(U8BIT PciId, U8BIT BusNr, U8BIT DevNr);
        void   CloseDriver(DRVHANDLE DriverHandle);
        char *GetWin32DeviceName(U8BIT BusNr, U8BIT DevNr, char *Buffer);
        #endif

        friend class PCIDevice;
    public:
        PCIBios(void);
        ~PCIBios(void);

        PCIDevice *GetActiveVGA(void);
        PCIDevice *GetSystemActiveVGA(void) { return SystemActiveVGA; }
        int GetVgaNr(PCIDevice *aPCIDevice);

        U8BIT ReadCfgField(U8BIT BusNr, U8BIT DevNr, U8BIT FnNr, U8BIT Offset, U32BIT *Buffer, U8BIT Operation);
        U8BIT WriteCfgField(U8BIT BusNr, U8BIT DevNr, U8BIT FnNr, U8BIT Offset, U32BIT Buffer, U8BIT Operation);

        U8BIT WriteCommand(U8BIT BusNr, U8BIT DevNr, U8BIT FnNr, U8BIT Code);
        U8BIT ReadCommand(U8BIT BusNr, U8BIT DevNr, U8BIT FnNr, U16BIT *Value);

        BOOL IsPresent(void) { return Present; }
        U8BIT GetHwMechanism(void) { return HwMechanism; }
        U16BIT GetVersion(void) { return Version; }
        U8BIT GetLastBus(void) { return LastBus; }
        U8BIT GetNrDevice(void) { return NrDevice; }
        PCIDevice *GetDevice(int Index) { return Index<NrDevice ? pDevice[Index] : NULL; }
        PCIDevice *FindDevice(int BusNr, int DevNr, int FnNr);
        char *GetDeviceTextDescription(int DeviceNr, char  *Buffer, BOOL Addresses=TRUE);
        char *GetVendorDescription(U16BIT VendorId, char  *Buffer);
        char *GetClassDescription(U8BIT Base, U8BIT Sub, char *Buffer);
        BOOL DeviceInSlot(U8BIT BusNr, U8BIT DevNr, U8BIT FnNr);
        int GetFullVendorDescription(U16BIT VendorId, U16BIT DeviceId, U16BIT OEMVendorId, U16BIT OEMDeviceId, char *VId, char *DId, char *OVId, char *ODId);

    };

//-[CLASS] PCIBios


// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
//[CLASS] PCIDevice
//+


//=====================================================================
//[FUNCTION/dynamic/public] PCIDevice::EnableIOAccess
// Test
//+
//[PARAMETERS]
// None
//.
//[RETURNS]
//.
//[PROTOTYPE]
void inline PCIDevice::EnableIOAccess(void)
//.
{
TheBios->WriteCommand(BusNr, DevNr, FnNr, PCICMD_ENABLE_IO);
}
//-[FUNCTION] PCIDevice::EnableIOAccess

//=====================================================================
//[FUNCTION/dynamic/public] PCIDevice::DisableIOAccess
// Test
//+
//[PARAMETERS]
// None
//.
//[RETURNS]
//.
//[PROTOTYPE]
void inline PCIDevice::DisableIOAccess(void)
//.
{
TheBios->WriteCommand(BusNr, DevNr, FnNr, PCICMD_DISABLE_IO);
}
//-[FUNCTION] PCIDevice::DisableIOAccess

//=====================================================================
//[FUNCTION/dynamic/public] PCIDevice::EnableMemAccess
// Test
//+
//[PARAMETERS]
// None
//.
//[RETURNS]
//.
//[PROTOTYPE]
void inline PCIDevice::EnableMemAccess(void)
//.
{
TheBios->WriteCommand(BusNr, DevNr, FnNr, PCICMD_ENABLE_MEM);
}
//-[FUNCTION] PCIDevice::EnableMemAccess

//=====================================================================
//[FUNCTION/dynamic/public] PCIDevice::DisableMemAccess
// Test
//+
//[PARAMETERS]
// None
//.
//[RETURNS]
//.
//[PROTOTYPE]
void inline PCIDevice::DisableMemAccess(void)
//.
{
TheBios->WriteCommand(BusNr, DevNr, FnNr, PCICMD_DISABLE_MEM);
}
//-[FUNCTION] PCIDevice::DisableMemAccess

//=====================================================================
//[FUNCTION/dynamic/public] PCIDevice::EnablePalAccess
// Test
//+
//[PARAMETERS]
// None
//.
//[RETURNS]
//.
//[PROTOTYPE]
void inline PCIDevice::EnablePalAccess(void)
//.
{
TheBios->WriteCommand(BusNr, DevNr, FnNr, PCICMD_ENABLE_PAL);
}
//-[FUNCTION] PCIDevice::EnablePalAccess

//=====================================================================
//[FUNCTION/dynamic/public] PCIDevice::DisablePalAccess
// Test
//+
//[PARAMETERS]
// None
//.
//[RETURNS]
//.
//[PROTOTYPE]
void inline PCIDevice::DisablePalAccess(void)
//.
{
TheBios->WriteCommand(BusNr, DevNr, FnNr, PCICMD_DISABLE_PAL);
}
//-[FUNCTION] PCIDevice::DisablePalAccess

//-[CLASS] PCIDevice



int inline operator ==(const PCIDevice& D1, const PCIDevice& D2)
{
return D1.BusNr==D2.BusNr && D1.DevNr==D2.DevNr;
}



#include <lvpackof.h>


#endif

//-[HEADER] PCI

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美中文字幕一区二区三区 | 色视频一区二区| 欧美一区二区免费视频| 国产精品麻豆99久久久久久| 婷婷综合在线观看| 99久久婷婷国产综合精品电影| 欧美大片拔萝卜| 亚洲电影在线播放| 91美女在线观看| 欧美激情综合五月色丁香小说| 日本大胆欧美人术艺术动态| 色婷婷精品大在线视频 | 亚洲日本免费电影| 国产成人av一区二区三区在线观看| 3atv在线一区二区三区| 亚洲欧美偷拍三级| 99视频超级精品| 久久久不卡网国产精品二区| 奇米精品一区二区三区在线观看一| 色婷婷综合在线| 亚洲人成亚洲人成在线观看图片| 国产成人精品aa毛片| 久久老女人爱爱| 国内精品视频666| 精品国产乱码久久久久久久| 日韩av一级片| 欧美一区永久视频免费观看| 日韩中文字幕亚洲一区二区va在线 | 精品在线免费视频| 日韩欧美激情在线| 久久精品国产亚洲aⅴ| 日韩一级片在线播放| 日韩国产欧美在线视频| 欧美精选在线播放| 日韩精品一卡二卡三卡四卡无卡| 欧美电影影音先锋| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美电影一区二区三区| 日产精品久久久久久久性色| 7777精品伊人久久久大香线蕉 | 日韩三级在线免费观看| 麻豆国产欧美日韩综合精品二区 | 在线播放欧美女士性生活| 亚洲国产精品久久不卡毛片 | 久久欧美一区二区| 国产成人免费视频一区| 国产精品久久久久久久裸模| 91一区二区在线| 亚洲成人一二三| 日韩女优av电影在线观看| 韩日av一区二区| 最新中文字幕一区二区三区| 91黄视频在线| 蜜臀精品一区二区三区在线观看| 精品欧美一区二区三区精品久久| 国产精品伊人色| 国产精品午夜电影| 欧美日本乱大交xxxxx| 国产综合色在线| 成人免费一区二区三区在线观看 | av在线这里只有精品| 一区二区三区在线免费观看| 欧美一区二区福利视频| 国产精华液一区二区三区| 亚洲激情六月丁香| 日韩一级大片在线观看| 成人av资源在线观看| 亚洲电影视频在线| wwwwxxxxx欧美| 91福利社在线观看| 国产在线精品视频| 亚洲影院理伦片| 精品三级在线看| 色婷婷综合久久久久中文一区二区 | 亚洲精品大片www| 精品黑人一区二区三区久久| 91丝袜高跟美女视频| 青青草97国产精品免费观看| 国产精品久久久久久久久免费相片| 欧美日韩精品电影| 91在线视频18| 国产精品一二三四五| 香蕉久久夜色精品国产使用方法| 国产女人18毛片水真多成人如厕| 欧美天堂亚洲电影院在线播放| 国产一区二区三区av电影| 亚洲一区二区三区影院| 国产精品美女久久久久久久久| 欧美日产在线观看| 日本丰满少妇一区二区三区| 成人丝袜视频网| 老色鬼精品视频在线观看播放| 亚洲一区二区三区美女| 国产精品卡一卡二| 国产亚洲美州欧州综合国| 日韩一级免费观看| 欧美精品欧美精品系列| 欧美色图一区二区三区| 99精品视频在线免费观看| 久久av资源网| 日本vs亚洲vs韩国一区三区二区| 亚洲最大的成人av| 亚洲天堂久久久久久久| 亚洲欧洲国产专区| 国产欧美日本一区视频| 久久日韩精品一区二区五区| 日韩精品一区二区三区在线播放 | 欧美怡红院视频| 97久久精品人人做人人爽| 成人av在线看| 成人午夜私人影院| 成人精品一区二区三区中文字幕| 国产在线麻豆精品观看| 久久99精品视频| 国产一区二区三区av电影| 国产精品99精品久久免费| 国产剧情一区二区| 国产福利精品导航| 成人国产一区二区三区精品| 成人动漫av在线| 不卡欧美aaaaa| 色综合天天性综合| 91福利视频久久久久| 欧美日韩国产系列| 日韩视频一区二区三区在线播放 | 欧美精品一二三四| 4438亚洲最大| 久久综合色一综合色88| 国产亚洲成aⅴ人片在线观看| 久久久无码精品亚洲日韩按摩| 久久久高清一区二区三区| 成人免费在线观看入口| 亚洲国产精品久久人人爱| 日日夜夜一区二区| 经典三级一区二区| 成人性色生活片| 91福利社在线观看| 日韩美女主播在线视频一区二区三区| 欧美mv日韩mv国产网站| 国产精品人妖ts系列视频| 亚洲在线视频免费观看| 看电影不卡的网站| av电影天堂一区二区在线观看| 日本精品一级二级| 正在播放亚洲一区| 国产精品视频一二三区| 图片区小说区区亚洲影院| 久久精品国产久精国产爱| 91亚洲精品乱码久久久久久蜜桃| 欧美军同video69gay| 久久久国产精华| 亚洲国产视频在线| 成人综合婷婷国产精品久久| 欧美日韩精品一区视频| 国产欧美一区二区在线| 亚洲国产日韩av| 国产福利一区二区| 欧美精品v国产精品v日韩精品| 国产无人区一区二区三区| 亚洲aⅴ怡春院| 成人高清视频免费观看| 欧美高清激情brazzers| 亚洲视频一区二区在线观看| 久久精品二区亚洲w码| 91女神在线视频| 亚洲精品一区二区三区香蕉| 伊人色综合久久天天| 国产麻豆精品在线| 91 com成人网| 亚洲精品伦理在线| 国产成人激情av| 日韩免费观看高清完整版| 一区二区三区在线免费观看 | 国产精品三级电影| 美女爽到高潮91| 91成人免费在线| 国产精品女上位| 国产精品自拍网站| 欧美一区日本一区韩国一区| 亚洲精品伦理在线| 91丨九色porny丨蝌蚪| 久久精品免费在线观看| 美腿丝袜亚洲一区| 51精品久久久久久久蜜臀| 亚洲精品v日韩精品| 成人亚洲精品久久久久软件| 欧美成人猛片aaaaaaa| 日韩专区中文字幕一区二区| 色爱区综合激月婷婷| 亚洲欧洲一区二区三区| av综合在线播放| 国产清纯白嫩初高生在线观看91| 另类专区欧美蜜桃臀第一页| 欧美一区二区视频网站| 亚洲成人自拍偷拍| 欧美日韩高清影院| 日韩专区欧美专区| 日韩一级片网址| 久久99这里只有精品| 久久综合av免费|