Skip to main content
← PSoXide SDK guides and examples · SDK 80d1c329e977 · All Cargo features enabled; check feature gates before use.

DmaOwners

Struct DmaOwners 

Source
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>

Source

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.

Auto Trait Implementations§

§

impl<'a> Freeze for DmaOwners<'a>

§

impl<'a> RefUnwindSafe for DmaOwners<'a>

§

impl<'a> Send for DmaOwners<'a>

§

impl<'a> Sync for DmaOwners<'a>

§

impl<'a> Unpin for DmaOwners<'a>

§

impl<'a> UnsafeUnpin for DmaOwners<'a>

§

impl<'a> !UnwindSafe for DmaOwners<'a>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.