pub struct DmaOwners<'a> { /* private fields */ }Expand description
The DMA owner tokens, borrowed for as long as the bus is held quiet.
Every SDK driver that starts a transfer takes one of these tokens by &mut (psx_gpu::Gpu
owns GpuDma, psx_spu::Spu owns SpuDma, and so on; see psx_io::periph). A
Quiesced holds all of them, so inside the closure of with_dma_quiesced none of those
drivers can be used.
Implementations§
Source§impl<'a> DmaOwners<'a>
impl<'a> DmaOwners<'a>
Sourcepub fn new(
gpu: &'a mut GpuDma,
otc: &'a mut OrderingTableClearDma,
mdec: &'a mut MdecDma,
spu: &'a mut SpuDma,
cd: &'a mut Cd,
) -> Self
pub fn new( gpu: &'a mut GpuDma, otc: &'a mut OrderingTableClearDma, mdec: &'a mut MdecDma, spu: &'a mut SpuDma, cd: &'a mut Cd, ) -> Self
Borrow every DMA owner token. A driver that owns its token lends it through its own
accessor (Gpu::dma_mut, SectorReader::cd_mut, …); a program that kept its
Peripherals intact uses
Peripherals::dma_owners.