pub struct SpuDma { /* private fields */ }Expand description
DMA channel 4 (RAM to SPU RAM and back) and the SPU transfer port.
Implementations§
Source§impl SpuDma
impl SpuDma
Sourcepub fn write_blocks(&mut self, words: &[u32], block_words: u16) -> bool
pub fn write_blocks(&mut self, words: &[u32], block_words: u16) -> bool
Copy words to the SPU over DMA channel 4, in blocks of block_words
words, and wait for the channel to finish.
Enables the channel without disturbing the others, starts a block-sync
transfer, and ends it with wait_or_abort, so the SPU has taken
every word or the channel has been aborted by the time this returns.
The caller has already put the SPU in its DMA-write transfer mode.
Returns false without starting anything when words is empty (a zero
block count means 65,536 blocks on silicon), when block_words is 0 or
does not divide the length, or when the block count does not fit the
16-bit field; and false when the channel wedged and was aborted.