pub struct HdmaCtrl(/* private fields */);cgb only.Expand description
VRAM DMA length, mode, and start (HDMA5).
| Bit | Field | Access | Meaning |
|---|---|---|---|
| 7 | hblank | R/W | Write: set = HBlank DMA, clear = general-purpose. Read: set = no transfer active. |
| 6-0 | blocks | R/W | Transfer length in 16-byte blocks, minus one (0 = one block). |
Implementations§
Source§impl HdmaCtrl
impl HdmaCtrl
Sourcepub const fn blocks(&self) -> u8
pub const fn blocks(&self) -> u8
Transfer length in 16-byte blocks, minus one (0 means one block).
Bits: 0..7
Sourcepub const fn with_blocks_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_blocks_checked(self, value: u8) -> Result<Self, ()>
Transfer length in 16-byte blocks, minus one (0 means one block).
Bits: 0..7
Sourcepub const fn with_blocks(self, value: u8) -> Self
pub const fn with_blocks(self, value: u8) -> Self
Transfer length in 16-byte blocks, minus one (0 means one block).
Bits: 0..7
Sourcepub const fn set_blocks(&mut self, value: u8)
pub const fn set_blocks(&mut self, value: u8)
Transfer length in 16-byte blocks, minus one (0 means one block).
Bits: 0..7
Sourcepub const fn set_blocks_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_blocks_checked(&mut self, value: u8) -> Result<(), ()>
Transfer length in 16-byte blocks, minus one (0 means one block).
Bits: 0..7
Sourcepub const fn hblank(&self) -> bool
pub const fn hblank(&self) -> bool
On write: true selects HBlank DMA, false general-purpose DMA. On
read: true means no transfer is currently active.
Bits: 7..8
Sourcepub const fn with_hblank_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_hblank_checked(self, value: bool) -> Result<Self, ()>
On write: true selects HBlank DMA, false general-purpose DMA. On
read: true means no transfer is currently active.
Bits: 7..8
Sourcepub const fn with_hblank(self, value: bool) -> Self
pub const fn with_hblank(self, value: bool) -> Self
On write: true selects HBlank DMA, false general-purpose DMA. On
read: true means no transfer is currently active.
Bits: 7..8
Sourcepub const fn set_hblank(&mut self, value: bool)
pub const fn set_hblank(&mut self, value: bool)
On write: true selects HBlank DMA, false general-purpose DMA. On
read: true means no transfer is currently active.
Bits: 7..8