[−][src]Struct gba_hal::data::KeyControl
Affects when a key interrupt is triggered.
This is intended for bringing the GBA out of the very-low-power mode, not for general input.
- There's one bit per button, matching the bits of the KeyInput type.
- 14: Key interrupts enabled
- 15:
true
if all selected keys must be pressed to trigger the interrupt (Logical AND),false
if any selected key can be pressed to trigger the interrupt (Logical OR).
Methods
impl KeyControl
[src]
impl KeyControl
[src]
pub const A_BIT: u16
[src]
pub const fn a(self) -> bool
[src]
pub const fn with_a(self, bit: bool) -> Self
[src]
pub const B_BIT: u16
[src]
pub const fn b(self) -> bool
[src]
pub const fn with_b(self, bit: bool) -> Self
[src]
pub const SELECT_BIT: u16
[src]
pub const fn select(self) -> bool
[src]
pub const fn with_select(self, bit: bool) -> Self
[src]
pub const START_BIT: u16
[src]
pub const fn start(self) -> bool
[src]
pub const fn with_start(self, bit: bool) -> Self
[src]
pub const RIGHT_BIT: u16
[src]
pub const fn right(self) -> bool
[src]
pub const fn with_right(self, bit: bool) -> Self
[src]
pub const LEFT_BIT: u16
[src]
pub const fn left(self) -> bool
[src]
pub const fn with_left(self, bit: bool) -> Self
[src]
pub const UP_BIT: u16
[src]
pub const fn up(self) -> bool
[src]
pub const fn with_up(self, bit: bool) -> Self
[src]
pub const DOWN_BIT: u16
[src]
pub const fn down(self) -> bool
[src]
pub const fn with_down(self, bit: bool) -> Self
[src]
pub const R_BIT: u16
[src]
pub const fn r(self) -> bool
[src]
pub const fn with_r(self, bit: bool) -> Self
[src]
pub const L_BIT: u16
[src]
pub const fn l(self) -> bool
[src]
pub const fn with_l(self, bit: bool) -> Self
[src]
pub const IRQ_ENABLED_BIT: u16
[src]
pub const fn irq_enabled(self) -> bool
[src]
pub const fn with_irq_enabled(self, bit: bool) -> Self
[src]
pub const REQUIRE_ALL_SELECTED_KEYS_BIT: u16
[src]
pub const fn require_all_selected_keys(self) -> bool
[src]
pub const fn with_require_all_selected_keys(self, bit: bool) -> Self
[src]
Trait Implementations
impl PartialEq<KeyControl> for KeyControl
[src]
fn eq(&self, other: &KeyControl) -> bool
[src]
fn ne(&self, other: &KeyControl) -> bool
[src]
impl Eq for KeyControl
[src]
impl Copy for KeyControl
[src]
impl Debug for KeyControl
[src]
impl Clone for KeyControl
[src]
fn clone(&self) -> KeyControl
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for KeyControl
[src]
fn default() -> KeyControl
[src]
Auto Trait Implementations
impl Send for KeyControl
impl Sync for KeyControl
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,