• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 //! Implements pci devices and busses.
6 
7 mod ac97;
8 mod ac97_bus_master;
9 mod ac97_mixer;
10 mod ac97_regs;
11 mod pci_configuration;
12 mod pci_device;
13 mod pci_root;
14 
15 pub use self::ac97::Ac97Dev;
16 pub use self::pci_configuration::{
17     PciBarConfiguration, PciBarPrefetchable, PciBarRegionType, PciCapability, PciCapabilityID,
18     PciClassCode, PciConfiguration, PciHeaderType, PciProgrammingInterface, PciSerialBusSubClass,
19     PciSubclass,
20 };
21 pub use self::pci_device::Error as PciDeviceError;
22 pub use self::pci_device::PciDevice;
23 pub use self::pci_root::{PciConfigIo, PciConfigMmio, PciRoot};
24 
25 /// PCI has four interrupt pins A->D.
26 #[derive(Copy, Clone)]
27 pub enum PciInterruptPin {
28     IntA,
29     IntB,
30     IntC,
31     IntD,
32 }
33 
34 impl PciInterruptPin {
to_mask(self) -> u3235     pub fn to_mask(self) -> u32 {
36         self as u32
37     }
38 }
39