[][src]Struct gba_hal::data::BackgroundControl

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

Allows configuration of a background layer.

Bits 0-1: BG Priority (lower number is higher priority, like an index) Bits 2-3: Character Base Block (0 through 3, 16k each) Bit 6: Mosaic mode Bit 7: is 8bpp Bit 8-12: Screen Base Block (0 through 31, 2k each) Bit 13: Display area overflow wraps (otherwise transparent, affine BG only) Bit 14-15: Screen Size (details depend on Text/Affine mode)

Methods

impl BackgroundControl[src]

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

A const "zero value" constructor

impl BackgroundControl[src]

pub const BG_PRIORITY_MASK: u16[src]

pub const fn bg_priority(self) -> u16[src]

pub const fn with_bg_priority(self, bg_priority: u16) -> Self[src]

pub const CHAR_BASE_BLOCK_MASK: u16[src]

pub const fn char_base_block(self) -> u16[src]

pub const fn with_char_base_block(self, char_base_block: u16) -> Self[src]

pub const MOSAIC_BIT: u16[src]

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

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

pub const IS_8BPP_BIT: u16[src]

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

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

pub const SCREEN_BASE_BLOCK_MASK: u16[src]

pub const fn screen_base_block(self) -> u16[src]

pub const fn with_screen_base_block(self, screen_base_block: u16) -> Self[src]

pub const AFFINE_DISPLAY_OVERFLOW_WRAPPING_BIT: u16[src]

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

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

pub const SIZE_MASK: u16[src]

pub const fn size(self) -> u16[src]

pub const fn with_size(self, size: u16) -> Self[src]

Trait Implementations

impl PartialEq<BackgroundControl> for BackgroundControl[src]

impl Eq for BackgroundControl[src]

impl Debug for BackgroundControl[src]

impl Copy for BackgroundControl[src]

impl Clone for BackgroundControl[src]

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

Performs copy-assignment from source. Read more

impl Default for BackgroundControl[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]