rust-osdev/pci_types

Add method to get the PciAddress of a PciHeader

Closed this issue · 2 comments

The PciHeader only contains a PciAddress, yet currently it hides it from the user. As such if someone need access to both a PciHeader for accessing the config space and needs to know the PciAddress, either both need to be passed separately, or every function that needs both needs to recreate the PciHeader and in the case of EndpointHeader unwrap the result of EndpointHeader::from again.

Hey, thanks for the suggestion.

e309f7d adds a PciHeader::address helper method to get the address. Published as pci_types v0.9.0.

bjorn3 commented

Thanks!