[][src]Struct gba_hal::data::InterruptEnable

#[repr(transparent)]
pub struct InterruptEnable(_);

This controls what types of interrupts can fire.

Note that for each type of interrupt given here, there's also an interrupt flag in that item's IO control registers. For example, there's a VBlank interrupt flag here, and another VBlank interrupt flag in the DisplayStatus. The locations vary by interrupt category.

In any case, BOTH flags have to be set (as well as IME) for the interrupt to actually happen at the appropriate time.

  • 0: VBlank
  • 1: HBlank
  • 2: VCounter Match
  • 3: Timer 0 Overflow
  • 4: Timer 1 Overflow
  • 5: Timer 2 Overflow
  • 6: Timer 3 Overflow
  • 7: Serial Communication
  • 8: DMA 0 Completed
  • 9: DMA 1 Completed
  • 10: DMA 2 Completed
  • 11: DMA 3 Completed
  • 12: Keypad
  • 13: Game Pak

Methods

impl InterruptEnable[src]

pub const fn new() -> Self[src]

A const "zero value" constructor

impl InterruptEnable[src]

pub const VBLANK_BIT: u16[src]

pub const fn vblank(self) -> bool[src]

pub const fn with_vblank(self, bit: bool) -> Self[src]

pub const HBLANK_BIT: u16[src]

pub const fn hblank(self) -> bool[src]

pub const fn with_hblank(self, bit: bool) -> Self[src]

pub const VCOUNTER_BIT: u16[src]

pub const fn vcounter(self) -> bool[src]

pub const fn with_vcounter(self, bit: bool) -> Self[src]

pub const TIMER0_BIT: u16[src]

pub const fn timer0(self) -> bool[src]

pub const fn with_timer0(self, bit: bool) -> Self[src]

pub const TIMER1_BIT: u16[src]

pub const fn timer1(self) -> bool[src]

pub const fn with_timer1(self, bit: bool) -> Self[src]

pub const TIMER2_BIT: u16[src]

pub const fn timer2(self) -> bool[src]

pub const fn with_timer2(self, bit: bool) -> Self[src]

pub const TIMER3_BIT: u16[src]

pub const fn timer3(self) -> bool[src]

pub const fn with_timer3(self, bit: bool) -> Self[src]

pub const SERIAL_BIT: u16[src]

pub const fn serial(self) -> bool[src]

pub const fn with_serial(self, bit: bool) -> Self[src]

pub const DMA0_BIT: u16[src]

pub const fn dma0(self) -> bool[src]

pub const fn with_dma0(self, bit: bool) -> Self[src]

pub const DMA1_BIT: u16[src]

pub const fn dma1(self) -> bool[src]

pub const fn with_dma1(self, bit: bool) -> Self[src]

pub const DMA2_BIT: u16[src]

pub const fn dma2(self) -> bool[src]

pub const fn with_dma2(self, bit: bool) -> Self[src]

pub const DMA3_BIT: u16[src]

pub const fn dma3(self) -> bool[src]

pub const fn with_dma3(self, bit: bool) -> Self[src]

pub const KEYPAD_BIT: u16[src]

pub const fn keypad(self) -> bool[src]

pub const fn with_keypad(self, bit: bool) -> Self[src]

pub const GAME_PAK_BIT: u16[src]

pub const fn game_pak(self) -> bool[src]

pub const fn with_game_pak(self, bit: bool) -> Self[src]

Trait Implementations

impl PartialEq<InterruptEnable> for InterruptEnable[src]

impl Eq for InterruptEnable[src]

impl Debug for InterruptEnable[src]

impl Copy for InterruptEnable[src]

impl Clone for InterruptEnable[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for InterruptEnable[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]