[−][src]Struct sunrise_kernel::devices::hpet::Hpet
Represent an HPET device.
Fields
inner: *mut HpetRegister
The mmio address of this HPET device.
period: u32
Cached value of Hpet::period
.
timer_count: u32
The count of timer of this HPET device.
Implementations
impl Hpet
[src]
fn new(inner: *mut HpetRegister) -> Self
[src]
Create a new HPET device instance from MMIO registers.
pub fn has_legacy_mapping(&self) -> bool
[src]
Return true if the device supports "legacy mapping".
pub fn get_period(&self) -> u32
[src]
Return the period of the HPET device.
pub fn get_frequency(&self) -> u64
[src]
Return the frequency of the HPET device.
pub fn enable_legacy_mapping(&self)
[src]
Enable the "legacy mapping".
pub fn disable_legacy_mapping(&self)
[src]
Disable the "legacy mapping".
pub fn is_legacy_mapping_enabled(&self) -> bool
[src]
Check "legacy mapping" status.
pub fn enable(&self)
[src]
Enable HPET (main timer running, and timer interrupts allowed).
pub fn set_main_counter_value(&self, value: u64)
[src]
Set HPET main counter value.
pub fn get_main_counter_value(&self) -> u64
[src]
Get HPET main counter value.
pub fn disable(&self)
[src]
Disable HPET (main timer halted, and timer interrupts disabled).
pub fn is_enabled(&self) -> bool
[src]
Check HPET status.
pub fn get_timer(&self, index: u32) -> Option<HpetTimer>
[src]
Get a timer at the given index.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Hpet
impl !Send for Hpet
impl !Sync for Hpet
impl Unpin for Hpet
impl UnwindSafe for Hpet
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,