Skip to main content

X86PitDevice

Struct X86PitDevice 

Source
pub struct X86PitDevice<H: X86VlapicHostOps> { /* private fields */ }
Expand description

Unified-device adapter for EmulatedPit.

Implementations§

Source§

impl<H: X86VlapicHostOps> X86PitDevice<H>

Source

pub fn new() -> Self

Creates a PIT adapter.

Source

pub const fn inner(&self) -> &EmulatedPit<H>

Returns the wrapped OS-neutral PIT core.

Trait Implementations§

Source§

impl<H: X86VlapicHostOps> Default for X86PitDevice<H>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<H: X86VlapicHostOps + 'static> Device for X86PitDevice<H>

Source§

fn name(&self) -> &str

Returns a human-readable name for this device (used in logging and diagnostics).
Source§

fn resources(&self) -> &[Resource]

Returns the resources (MMIO windows, port ranges, system registers) this device requires. Read more
Source§

fn handle(&self, access: &BusAccess) -> Result<BusResponse, DeviceError>

Handles a single bus access. Read more
Source§

fn as_any(&self) -> &dyn Any

Returns a reference to self as &dyn Any for downcasting.
Source§

fn reset(&mut self) -> Result<(), DeviceError>

Resets the device to its power-on state.
Source§

fn suspend(&mut self) -> Result<(), DeviceError>

Puts the device into a low-power or suspended state.
Source§

fn resume(&mut self) -> Result<(), DeviceError>

Restores the device from a suspended state.
Source§

impl<H: X86VlapicHostOps> X86PitDeviceOps for X86PitDevice<H>

Source§

fn consume_irq0_if_due(&self, now_ns: u64) -> bool

Consume a pending PIT IRQ0 tick if the deadline is due.

Auto Trait Implementations§

§

impl<H> !Freeze for X86PitDevice<H>

§

impl<H> !RefUnwindSafe for X86PitDevice<H>

§

impl<H> Send for X86PitDevice<H>

§

impl<H> Sync for X86PitDevice<H>

§

impl<H> Unpin for X86PitDevice<H>

§

impl<H> UnsafeUnpin for X86PitDevice<H>

§

impl<H> UnwindSafe for X86PitDevice<H>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.