Also allow ?Sized types to get the physaddr.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user