[−][src]Struct rubidium::DisplayStatusValue
Relates to the status of the display.
When writing this value to DISPSTAT
, the vblank
, hblank
, and
vcounter
settings aren't actually written. They can still be modified on
this type if you want to set up a specific value and then check for equality
or something.
Setting the interrupt related flags is dangerous if your interrupt handler
isn't set up to handle the appropriate types of interrupts. Even if you set
for interrupt types to occur here they won't fire unless you also enable
them in the IME
register, and of course you must have interrupts enabled
overall using the IE
register.
vblank
: Set duringVCOUNT
lines 160 to 226, but not 227.hblank
: Set when you're in hblank, after the current line has completed drawing. It takes 960 cycles to draw a line, but GBATEK says that this is off for 1006 cycles per line.vcounter
: Set if the currentVCOUNT
value matches thevcount_trigger
value.vblank_irq
: If an interrupt should be triggered at start of vblank.hblank_irq
: If an interrupt should be triggered at start of hblank.vcounter_irq
: If an interrupt should be triggered whenVCOUNT
matches thevcount_trigger
value.vcount_trigger
: The scanline that you want to use for vcount interrupts and thevcounter
flag.
Methods
impl DisplayStatusValue
[src]
pub const fn new() -> Self
[src]
#[must_use]pub const fn vblank(self) -> bool
[src]
#[must_use]pub const fn with_vblank(self, b: bool) -> Self
[src]
pub fn set_vblank(&mut self, b: bool)
[src]
#[must_use]pub const fn hblank(self) -> bool
[src]
#[must_use]pub const fn with_hblank(self, b: bool) -> Self
[src]
pub fn set_hblank(&mut self, b: bool)
[src]
#[must_use]pub const fn vcounter(self) -> bool
[src]
#[must_use]pub const fn with_vcounter(self, b: bool) -> Self
[src]
pub fn set_vcounter(&mut self, b: bool)
[src]
#[must_use]pub const fn vblank_irq(self) -> bool
[src]
#[must_use]pub const fn with_vblank_irq(self, b: bool) -> Self
[src]
pub fn set_vblank_irq(&mut self, b: bool)
[src]
#[must_use]pub const fn hblank_irq(self) -> bool
[src]
#[must_use]pub const fn with_hblank_irq(self, b: bool) -> Self
[src]
pub fn set_hblank_irq(&mut self, b: bool)
[src]
#[must_use]pub const fn vcounter_irq(self) -> bool
[src]
#[must_use]pub const fn with_vcounter_irq(self, b: bool) -> Self
[src]
pub fn set_vcounter_irq(&mut self, b: bool)
[src]
#[must_use]pub const fn vcount_trigger(self) -> u16
[src]
#[must_use]pub const fn with_vcount_trigger(self, u: u16) -> Self
[src]
pub fn set_vcount_trigger(&mut self, u: u16)
[src]
Trait Implementations
impl Clone for DisplayStatusValue
[src]
fn clone(&self) -> DisplayStatusValue
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for DisplayStatusValue
[src]
impl Debug for DisplayStatusValue
[src]
impl Default for DisplayStatusValue
[src]
fn default() -> DisplayStatusValue
[src]
impl Eq for DisplayStatusValue
[src]
impl PartialEq<DisplayStatusValue> for DisplayStatusValue
[src]
fn eq(&self, other: &DisplayStatusValue) -> bool
[src]
fn ne(&self, other: &DisplayStatusValue) -> bool
[src]
impl StructuralEq for DisplayStatusValue
[src]
impl StructuralPartialEq for DisplayStatusValue
[src]
Auto Trait Implementations
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>,