[−][src]Struct sunrise_kernel::devices::hpet::HpetTimer
Represent an HPET timer.
Fields
inner: *mut HpetTimerRegister
The mmio address of this HPET timer.
support_64bit: bool
Cached value of HpetTimerConfigurationRegister::size_capability
.
support_periodic_interrupt: bool
Cached value of HpetTimerConfigurationRegister::periodic_interrupt_capability
.
support_fsb_interrupt: bool
Cached value of HpetTimerConfigurationRegister::fsb_interrupt_capability
.
interrupt_route_capability: u32
Cached value of HpetTimerRegister::interrupt_route_capability
.
Implementations
impl HpetTimer
[src]
const MAX_IRQ: u32
[src]
This is the maximum IRQ lines supported by the HPET.
fn new(inner: *mut HpetTimerRegister) -> Self
[src]
Create a new HPET timer instance from MMIO registers.
pub fn support_64bit(&self) -> bool
[src]
Return true if this timer is a 64 bits timer.
pub fn support_periodic_interrupt(&self) -> bool
[src]
Return true if this timer supports periodic interrupt.
pub fn support_fsb_interrupt(&self) -> bool
[src]
Return true if this timer supports fsb interrupt.
pub fn support_interrupt_routing(&self, index: u32) -> bool
[src]
Return true if the timer support routing to the given IRQ.
pub fn set_interrupt_route(&self, index: u32)
[src]
Set the routing for the interrupt to the I/O APIC.
Panics
Panics if the given interrupt route is not supported by this hpet timer.
pub fn set_comparator_value(&self, value: u64)
[src]
Set the timer comparactor value
pub fn set_accumulator_value(&self, value: u64)
[src]
pub fn set_edge_trigger(&self)
[src]
Set Edge Trigger.
pub fn set_level_trigger(&self)
[src]
Set Level Trigger.
pub fn set_one_shot_mode(&self)
[src]
Set the timer in One Shot mode.
pub fn set_periodic_mode(&self)
[src]
pub fn enable_interrupt(&self)
[src]
Enable interrupt.
pub fn disable_interrupt(&self)
[src]
Disable interrupt.
pub fn has_interrupt_enabled(&self) -> bool
[src]
Determine if the interrupt is enabled.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for HpetTimer
impl !Send for HpetTimer
impl !Sync for HpetTimer
impl Unpin for HpetTimer
impl UnwindSafe for HpetTimer
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>,