Struct hypervisor::x86_64::PitChannelState
source · #[repr(C)]pub struct PitChannelState {Show 13 fields
pub count: u32,
pub latched_count: u16,
pub count_latched: PitRWState,
pub status_latched: bool,
pub status: u8,
pub read_state: PitRWState,
pub write_state: PitRWState,
pub reload_value: u16,
pub rw_mode: PitRWMode,
pub mode: u8,
pub bcd: bool,
pub gate: bool,
pub count_load_time: u64,
}
Expand description
The PitChannelState represents the state of one of the PIT’s three counters.
Fields§
§count: u32
The starting value for the counter.
latched_count: u16
Stores the channel count from the last time the count was latched.
count_latched: PitRWState
Indicates the PitRWState state of reading the latch value.
status_latched: bool
Indicates whether ReadBack status has been latched.
status: u8
Stores the channel status from the last time the status was latched. The status contains information about the access mode of this channel, but changing those bits in the status will not change the behavior of the pit.
read_state: PitRWState
Indicates the PitRWState state of reading the counter.
write_state: PitRWState
Indicates the PitRWState state of writing the counter.
reload_value: u16
Stores the value with which the counter was initialized. Counters are 16- bit values with an effective range of 1-65536 (65536 represented by 0).
rw_mode: PitRWMode
The command access mode of this channel.
mode: u8
The operation mode of this channel.
bcd: bool
Whether or not we are in bcd mode. Not supported by KVM or crosvm’s PIT implementation.
gate: bool
Value of the gate input pin. This only applies to channel 2.
count_load_time: u64
Nanosecond timestamp of when the count value was loaded.
Trait Implementations§
source§impl Clone for PitChannelState
impl Clone for PitChannelState
source§fn clone(&self) -> PitChannelState
fn clone(&self) -> PitChannelState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PitChannelState
impl Debug for PitChannelState
source§impl<'de> Deserialize<'de> for PitChannelState
impl<'de> Deserialize<'de> for PitChannelState
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<&PitChannelState> for kvm_pit_channel_state
impl From<&PitChannelState> for kvm_pit_channel_state
source§fn from(item: &PitChannelState) -> Self
fn from(item: &PitChannelState) -> Self
source§impl From<&kvm_pit_channel_state> for PitChannelState
impl From<&kvm_pit_channel_state> for PitChannelState
source§impl PartialEq for PitChannelState
impl PartialEq for PitChannelState
source§fn eq(&self, other: &PitChannelState) -> bool
fn eq(&self, other: &PitChannelState) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PitChannelState
impl Serialize for PitChannelState
impl Copy for PitChannelState
impl Eq for PitChannelState
impl StructuralPartialEq for PitChannelState
Auto Trait Implementations§
impl RefUnwindSafe for PitChannelState
impl Send for PitChannelState
impl Sync for PitChannelState
impl Unpin for PitChannelState
impl UnwindSafe for PitChannelState
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.