#[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: u32The starting value for the counter.
latched_count: u16Stores the channel count from the last time the count was latched.
count_latched: PitRWStateIndicates the PitRWState state of reading the latch value.
status_latched: boolIndicates whether ReadBack status has been latched.
status: u8Stores 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: PitRWStateIndicates the PitRWState state of reading the counter.
write_state: PitRWStateIndicates the PitRWState state of writing the counter.
reload_value: u16Stores 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: PitRWModeThe command access mode of this channel.
mode: u8The operation mode of this channel.
bcd: boolWhether or not we are in bcd mode. Not supported by KVM or crosvm’s PIT implementation.
gate: boolValue of the gate input pin. This only applies to channel 2.
count_load_time: u64Nanosecond 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§impl Serialize for PitChannelState
impl Serialize for PitChannelState
impl Copy for PitChannelState
impl Eq for PitChannelState
impl StructuralPartialEq for PitChannelState
Auto Trait Implementations§
impl Freeze for PitChannelState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.