pub struct Pit<const CHAN: u8> { /* private fields */ }
Expand description
A periodic interrupt timer (PIT) channel.
Implementations§
source§impl<const CHAN: u8> Pit<CHAN>
impl<const CHAN: u8> Pit<CHAN>
sourcepub fn set_interrupt_enable(&mut self, enable: bool)
pub fn set_interrupt_enable(&mut self, enable: bool)
Enable (true) or disable (false) interrupt generation.
sourcepub fn is_interrupt_enabled(&self) -> bool
pub fn is_interrupt_enabled(&self) -> bool
Indicates if timeouts will (true) or will not (false) generate interrupts.
sourcepub fn current_timer_value(&self) -> u32
pub fn current_timer_value(&self) -> u32
Reads the current time value, in clock ticks.
Returns 0
if the timer is disabled.
sourcepub fn set_load_timer_value(&self, ticks: u32)
pub fn set_load_timer_value(&self, ticks: u32)
Loads the timer value for the next timer run.
ticks
is in clock ticks.
sourcepub fn load_timer_value(&self) -> u32
pub fn load_timer_value(&self) -> u32
Returns the load timer value for the next timer run, in clock ticks.
sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns true
if the PIT channel is enabled.
sourcepub fn is_elapsed(&self) -> bool
pub fn is_elapsed(&self) -> bool
Returns true
if the timer has elapsed.
sourcepub fn clear_elapsed(&self)
pub fn clear_elapsed(&self)
Clear the elapsed flag.
sourcepub fn set_chained(&mut self, chained: bool)
pub fn set_chained(&mut self, chained: bool)
Specify that this channel is chained to the previous channel.
This affects how the timer counts. If you’re looking to chain timers
easily, see Chained
.
sourcepub fn is_chained(&self) -> bool
pub fn is_chained(&self) -> bool
Returns true if this channel is chained to the previous channel.
Trait Implementations§
Auto Trait Implementations§
impl<const CHAN: u8> !RefUnwindSafe for Pit<CHAN>
impl<const CHAN: u8> !Sync for Pit<CHAN>
impl<const CHAN: u8> Unpin for Pit<CHAN>
impl<const CHAN: u8> !UnwindSafe for Pit<CHAN>
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
Mutably borrows from an owned value. Read more