[−][src]Struct gba_hal::data::TimerControl
Controls one of the four Timer units.
- 0-1: Tick however many CPU cycles
- 2: Instead of above, tick once per lower timer overflow (useless with Timer0).
- 6: Interrupt when this timer overflows
- 7: Enable bit.
Each timer also has a "reload" (WO) and "counter" (RO). A timer's "reload" value gets copied into the "counter" value every time that it overflows, or any time that the enable bit goes from 0 to 1.
Methods
impl TimerControl
[src]
impl TimerControl
[src]
pub const TICK_RATE_MASK: u8
[src]
pub fn tick_rate(self) -> TimerTickRate
[src]
pub const fn with_tick_rate(self, tick_rate: TimerTickRate) -> Self
[src]
pub const CASCADE_BIT: u8
[src]
pub const fn cascade(self) -> bool
[src]
pub const fn with_cascade(self, bit: bool) -> Self
[src]
pub const OVERFLOW_IRQ_BIT: u8
[src]
pub const fn overflow_irq(self) -> bool
[src]
pub const fn with_overflow_irq(self, bit: bool) -> Self
[src]
pub const ENABLED_BIT: u8
[src]
pub const fn enabled(self) -> bool
[src]
pub const fn with_enabled(self, bit: bool) -> Self
[src]
Trait Implementations
impl PartialEq<TimerControl> for TimerControl
[src]
fn eq(&self, other: &TimerControl) -> bool
[src]
fn ne(&self, other: &TimerControl) -> bool
[src]
impl Eq for TimerControl
[src]
impl Copy for TimerControl
[src]
impl Debug for TimerControl
[src]
impl Clone for TimerControl
[src]
fn clone(&self) -> TimerControl
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for TimerControl
[src]
fn default() -> TimerControl
[src]
Auto Trait Implementations
impl Send for TimerControl
impl Sync for TimerControl
Blanket Implementations
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,