[][src]Struct rubidium::DisplayStatusValue

#[repr(transparent)]pub struct 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 during VCOUNT 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 current VCOUNT value matches the vcount_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 when VCOUNT matches the vcount_trigger value.
  • vcount_trigger: The scanline that you want to use for vcount interrupts and the vcounter 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]

impl Copy for DisplayStatusValue[src]

impl Debug for DisplayStatusValue[src]

impl Default for DisplayStatusValue[src]

impl Eq for DisplayStatusValue[src]

impl PartialEq<DisplayStatusValue> for DisplayStatusValue[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]

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

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

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

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

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> 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.