We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
status
EndpointHeader
1 parent 144da34 commit 8f8138fCopy full SHA for 8f8138f
src/lib.rs
@@ -209,13 +209,17 @@ impl EndpointHeader {
209
}
210
211
212
+ pub fn status(&self, access: &impl ConfigRegionAccess) -> StatusRegister {
213
+ let data = unsafe { access.read(self.0, 0x4).get_bits(16..32) };
214
+ StatusRegister::new(data as u16)
215
+ }
216
+
217
pub fn header(&self) -> PciHeader {
218
PciHeader(self.0)
219
220
221
pub fn capability_pointer(&self, access: &impl ConfigRegionAccess) -> u16 {
- let data = unsafe { access.read(self.0, 0x4).get_bits(16..32) };
- let status = StatusRegister::new(data as u16);
222
+ let status = self.status(access);
223
if status.has_capability_list() {
224
unsafe { access.read(self.0, 0x34).get_bits(0..8) as u16 }
225
} else {
0 commit comments