You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use uefi_raw::protocol::pci::root_bridge::{PciRootBridgeIoAccess,PciRootBridgeIoProtocol,PciRootBridgeIoProtocolAttribute,PciRootBridgeIoProtocolOperation,PciRootBridgeIoProtocolWidth};
26
24
use uefi_raw::table::boot::{AllocateType,MemoryType,PAGE_SIZE};
27
25
28
26
#[cfg(doc)]
@@ -280,7 +278,80 @@ impl PciRootBridgeIo {
280
278
}
281
279
}
282
280
283
-
// TODO: poll I/O
281
+
/// Polls a same memory location until criteria is met.
282
+
/// The criteria in question is met when value read from provided reference
283
+
/// equals to provided value when masked:
284
+
/// `(*to_poll) & mask == value`
285
+
/// /// Refer to [`Self::poll_io`] for polling io port instead.
286
+
///
287
+
/// # Returns
288
+
/// [`Ok`]: Criteria was met before timeout.
289
+
/// [`Err`]: One of below error happened:
290
+
/// * [`Status::TIMEOUT`]: Delay expired before a match occurred.
291
+
/// * [`Status::OUT_OF_RESOURCES`]: The request could not be completed due to a lack of resources.
292
+
///
293
+
/// # Panic
294
+
/// Panics when delay is too large (longer than 58494 years).
0 commit comments