mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 08:41:34 +11:00
Add some room to breathe
This commit is contained in:
parent
effaac3885
commit
b2c16f754b
|
@ -49,9 +49,11 @@ impl<T, const N: usize> MemoryMapped1DArray<T, N> {
|
||||||
array: address as *mut [T; N],
|
array: address as *mut [T; N],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get(&self, n: usize) -> T {
|
pub fn get(&self, n: usize) -> T {
|
||||||
unsafe { (&mut (*self.array)[n] as *mut T).read_volatile() }
|
unsafe { (&mut (*self.array)[n] as *mut T).read_volatile() }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set(&self, n: usize, val: T) {
|
pub fn set(&self, n: usize, val: T) {
|
||||||
unsafe { (&mut (*self.array)[n] as *mut T).write_volatile(val) }
|
unsafe { (&mut (*self.array)[n] as *mut T).write_volatile(val) }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue