pub struct Lcdc(/* private fields */);Expand description
LCD control (LCDC). Each field’s name describes the meaning when set.
| Bit | Field | Access | Meaning |
|---|---|---|---|
| 7 | lcd_enable | R/W | LCD and PPU enable. |
| 6 | window_tilemap_high | R/W | Window tile map at 0x9C00 instead of 0x9800. |
| 5 | window_enable | R/W | Window enable. |
| 4 | tiledata_8000 | R/W | BG/window tile data from the 0x8000 area instead of 0x8800. |
| 3 | bg_tilemap_high | R/W | BG tile map at 0x9C00 instead of 0x9800. |
| 2 | obj_tall | R/W | Object size 8x16 instead of 8x8. |
| 1 | obj_enable | R/W | Object (sprite) rendering enable. |
| 0 | bg_window_enable | R/W | BG and window enable (DMG); BG/window master priority (CGB). |
Implementations§
Source§impl Lcdc
impl Lcdc
Sourcepub const fn bg_window_enable(&self) -> bool
pub const fn bg_window_enable(&self) -> bool
BG and window enable (DMG); BG/window master priority (CGB).
Bits: 0..1
Sourcepub const fn with_bg_window_enable_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_bg_window_enable_checked( self, value: bool, ) -> Result<Self, ()>
BG and window enable (DMG); BG/window master priority (CGB).
Bits: 0..1
Sourcepub const fn with_bg_window_enable(self, value: bool) -> Self
pub const fn with_bg_window_enable(self, value: bool) -> Self
BG and window enable (DMG); BG/window master priority (CGB).
Bits: 0..1
Sourcepub const fn set_bg_window_enable(&mut self, value: bool)
pub const fn set_bg_window_enable(&mut self, value: bool)
BG and window enable (DMG); BG/window master priority (CGB).
Bits: 0..1
Sourcepub const fn set_bg_window_enable_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_bg_window_enable_checked( &mut self, value: bool, ) -> Result<(), ()>
BG and window enable (DMG); BG/window master priority (CGB).
Bits: 0..1
Sourcepub const fn obj_enable(&self) -> bool
pub const fn obj_enable(&self) -> bool
Object (sprite) rendering enable.
Bits: 1..2
Sourcepub const fn with_obj_enable_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_obj_enable_checked(self, value: bool) -> Result<Self, ()>
Object (sprite) rendering enable.
Bits: 1..2
Sourcepub const fn with_obj_enable(self, value: bool) -> Self
pub const fn with_obj_enable(self, value: bool) -> Self
Object (sprite) rendering enable.
Bits: 1..2
Sourcepub const fn set_obj_enable(&mut self, value: bool)
pub const fn set_obj_enable(&mut self, value: bool)
Object (sprite) rendering enable.
Bits: 1..2
Sourcepub const fn set_obj_enable_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_obj_enable_checked(&mut self, value: bool) -> Result<(), ()>
Object (sprite) rendering enable.
Bits: 1..2
Sourcepub const fn with_obj_tall_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_obj_tall_checked(self, value: bool) -> Result<Self, ()>
Object size is 8x16 instead of 8x8.
Bits: 2..3
Sourcepub const fn with_obj_tall(self, value: bool) -> Self
pub const fn with_obj_tall(self, value: bool) -> Self
Object size is 8x16 instead of 8x8.
Bits: 2..3
Sourcepub const fn set_obj_tall(&mut self, value: bool)
pub const fn set_obj_tall(&mut self, value: bool)
Object size is 8x16 instead of 8x8.
Bits: 2..3
Sourcepub const fn set_obj_tall_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_obj_tall_checked(&mut self, value: bool) -> Result<(), ()>
Object size is 8x16 instead of 8x8.
Bits: 2..3
Sourcepub const fn bg_tilemap_high(&self) -> bool
pub const fn bg_tilemap_high(&self) -> bool
BG tile map at 0x9C00 instead of 0x9800.
Bits: 3..4
Sourcepub const fn with_bg_tilemap_high_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_bg_tilemap_high_checked(self, value: bool) -> Result<Self, ()>
BG tile map at 0x9C00 instead of 0x9800.
Bits: 3..4
Sourcepub const fn with_bg_tilemap_high(self, value: bool) -> Self
pub const fn with_bg_tilemap_high(self, value: bool) -> Self
BG tile map at 0x9C00 instead of 0x9800.
Bits: 3..4
Sourcepub const fn set_bg_tilemap_high(&mut self, value: bool)
pub const fn set_bg_tilemap_high(&mut self, value: bool)
BG tile map at 0x9C00 instead of 0x9800.
Bits: 3..4
Sourcepub const fn set_bg_tilemap_high_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_bg_tilemap_high_checked( &mut self, value: bool, ) -> Result<(), ()>
BG tile map at 0x9C00 instead of 0x9800.
Bits: 3..4
Sourcepub const fn tiledata_8000(&self) -> bool
pub const fn tiledata_8000(&self) -> bool
BG/window tile data uses the 0x8000 (unsigned) instead of 0x8800 area.
Bits: 4..5
Sourcepub const fn with_tiledata_8000_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_tiledata_8000_checked(self, value: bool) -> Result<Self, ()>
BG/window tile data uses the 0x8000 (unsigned) instead of 0x8800 area.
Bits: 4..5
Sourcepub const fn with_tiledata_8000(self, value: bool) -> Self
pub const fn with_tiledata_8000(self, value: bool) -> Self
BG/window tile data uses the 0x8000 (unsigned) instead of 0x8800 area.
Bits: 4..5
Sourcepub const fn set_tiledata_8000(&mut self, value: bool)
pub const fn set_tiledata_8000(&mut self, value: bool)
BG/window tile data uses the 0x8000 (unsigned) instead of 0x8800 area.
Bits: 4..5
Sourcepub const fn set_tiledata_8000_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_tiledata_8000_checked(&mut self, value: bool) -> Result<(), ()>
BG/window tile data uses the 0x8000 (unsigned) instead of 0x8800 area.
Bits: 4..5
Sourcepub const fn window_enable(&self) -> bool
pub const fn window_enable(&self) -> bool
Window enable.
Bits: 5..6
Sourcepub const fn with_window_enable_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_window_enable_checked(self, value: bool) -> Result<Self, ()>
Window enable.
Bits: 5..6
Sourcepub const fn with_window_enable(self, value: bool) -> Self
pub const fn with_window_enable(self, value: bool) -> Self
Window enable.
Bits: 5..6
Sourcepub const fn set_window_enable(&mut self, value: bool)
pub const fn set_window_enable(&mut self, value: bool)
Window enable.
Bits: 5..6
Sourcepub const fn set_window_enable_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_window_enable_checked(&mut self, value: bool) -> Result<(), ()>
Window enable.
Bits: 5..6
Sourcepub const fn window_tilemap_high(&self) -> bool
pub const fn window_tilemap_high(&self) -> bool
Window tile map at 0x9C00 instead of 0x9800.
Bits: 6..7
Sourcepub const fn with_window_tilemap_high_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_window_tilemap_high_checked( self, value: bool, ) -> Result<Self, ()>
Window tile map at 0x9C00 instead of 0x9800.
Bits: 6..7
Sourcepub const fn with_window_tilemap_high(self, value: bool) -> Self
pub const fn with_window_tilemap_high(self, value: bool) -> Self
Window tile map at 0x9C00 instead of 0x9800.
Bits: 6..7
Sourcepub const fn set_window_tilemap_high(&mut self, value: bool)
pub const fn set_window_tilemap_high(&mut self, value: bool)
Window tile map at 0x9C00 instead of 0x9800.
Bits: 6..7
Sourcepub const fn set_window_tilemap_high_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_window_tilemap_high_checked( &mut self, value: bool, ) -> Result<(), ()>
Window tile map at 0x9C00 instead of 0x9800.
Bits: 6..7
Sourcepub const fn lcd_enable(&self) -> bool
pub const fn lcd_enable(&self) -> bool
LCD and PPU enable.
Bits: 7..8
Sourcepub const fn with_lcd_enable_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_lcd_enable_checked(self, value: bool) -> Result<Self, ()>
LCD and PPU enable.
Bits: 7..8
Sourcepub const fn with_lcd_enable(self, value: bool) -> Self
pub const fn with_lcd_enable(self, value: bool) -> Self
LCD and PPU enable.
Bits: 7..8
Sourcepub const fn set_lcd_enable(&mut self, value: bool)
pub const fn set_lcd_enable(&mut self, value: bool)
LCD and PPU enable.
Bits: 7..8