Also allow ?Sized types to get the physaddr.

This commit is contained in:
4lDO2
2020-01-19 13:16:56 +11:00
parent a2938fc7a3
commit 08a3800e87

View File

@@ -49,10 +49,13 @@ impl<T> Dma<T> {
virt: virt
})
}
}
impl<T: ?Sized> Dma<T> {
pub fn physical(&self) -> usize {
self.phys.address
}
}
impl<T> Dma<[T]> {
/// Crates a new DMA buffer with a size only known at runtime.
/// ## Safety