summary refs log blame commit diff
path: root/devices/src/pci/mod.rs
blob: 2579ba7bfbca515f5e260df10314ec04740f87f9 (plain) (tree)
1
2
3
4
5
6
7
8
9





                                                                         
                      
               
             
 



                                                                                  
                                                  
                                    
                                                              
 













                                     
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

//! Implements pci devices and busses.

mod pci_configuration;
mod pci_device;
mod pci_root;

pub use self::pci_configuration::{
    PciCapability, PciCapabilityID, PciClassCode, PciConfiguration, PciHeaderType,
    PciProgrammingInterface, PciSubclass,
};
pub use self::pci_device::Error as PciDeviceError;
pub use self::pci_device::PciDevice;
pub use self::pci_root::{PciConfigIo, PciConfigMmio, PciRoot};

/// PCI has four interrupt pins A->D.
#[derive(Copy, Clone)]
pub enum PciInterruptPin {
    IntA,
    IntB,
    IntC,
    IntD,
}

impl PciInterruptPin {
    pub fn to_mask(self) -> u32 {
        self as u32
    }
}