I'm not sure the reason the inner value is private. I am writing a concrete type for ConfigRegionAccess using PCI Configuration Space Access Mechanism 1, and the inner type is already the correct configuration, I just need to mask out the segment and shift it...
Else I've got to extract bits using bus, device and function methods; then check bounds and re-pack them back into the same format as they are already in.
Making this field public would meet my needs admirably.
(Another idea would be to have a pub fn (&self, offset: u16) -> Option<u32> method, where the u32 is a Configuration Space Access Mechanism 1 address. (https://wiki.osdev.org/PCI#Configuration_Space_Access_Mechanism_#1) Even better if there is a type for that.)
Let me know if you'd like a PR for this.
Alex
I'm not sure the reason the inner value is private. I am writing a concrete type for ConfigRegionAccess using PCI Configuration Space Access Mechanism 1, and the inner type is already the correct configuration, I just need to mask out the segment and shift it...
Else I've got to extract bits using bus, device and function methods; then check bounds and re-pack them back into the same format as they are already in.
Making this field public would meet my needs admirably.
(Another idea would be to have a
pub fn (&self, offset: u16) -> Option<u32>method, where the u32 is a Configuration Space Access Mechanism 1 address. (https://wiki.osdev.org/PCI#Configuration_Space_Access_Mechanism_#1) Even better if there is a type for that.)Let me know if you'd like a PR for this.
Alex