pcid: Explain why PciBar is used instead of pcid_types::Bar

This commit is contained in:
bjorn3
2024-06-09 18:53:19 +02:00
parent b04915673d
commit eb2e670cd6
2 changed files with 2 additions and 1 deletions
+2
View File
@@ -2,6 +2,8 @@ use std::convert::TryInto;
use serde::{Deserialize, Serialize};
// This type is used instead of [pci_types::Bar] in the driver interface as the
// latter can't be serialized and is missing the convenience functions of [PciBar].
#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]
pub enum PciBar {
None,
-1
View File
@@ -199,7 +199,6 @@ impl PciEndpointHeader {
}
/// Return the Headers BARs.
// FIXME use pci_types::Bar instead
pub fn bars(&self, access: &impl ConfigRegionAccess) -> [PciBar; 6] {
let endpoint_header = self.endpoint_header(access);