示例#1
0
        public void Refresh()
        {
            Buses.Clear();

            for (uint busnum = 0; busnum < PciBus.MaxBusCount; busnum++)
            {
                var bus = new PciBus(busnum);
                if (bus.GetDevices().Count > 0)
                {
                    Buses[bus.BusNumber] = bus;
                }
            }
        }
示例#2
0
        public PciDevice(PciBus bus, uint devicenum)
        {
            Bus          = bus;
            DeviceNumber = devicenum;

            for (uint i = 0; i < PciFunction.MaxFunctionsCount; i++)
            {
                var function = new PciFunction(this, i);
                if (function.Exists())
                {
                    Functions[function.FunctionNumber] = function;
                }
            }
        }