From 08a3800e873b2cf018ecd7fb2695b0ea43326a9b Mon Sep 17 00:00:00 2001 From: 4lDO2 <4lDO2@protonmail.com> Date: Sun, 19 Jan 2020 13:16:56 +1100 Subject: [PATCH] Also allow ?Sized types to get the physaddr. --- src/io/dma.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/io/dma.rs b/src/io/dma.rs index 44ca782..d3ffbb9 100644 --- a/src/io/dma.rs +++ b/src/io/dma.rs @@ -49,10 +49,13 @@ impl Dma { virt: virt }) } +} +impl Dma { pub fn physical(&self) -> usize { self.phys.address } } + impl Dma<[T]> { /// Crates a new DMA buffer with a size only known at runtime. /// ## Safety