Add some room to breathe

This commit is contained in:
Gwilym Kuiper 2022-01-17 22:38:58 +00:00
parent effaac3885
commit b2c16f754b

View file

@ -49,9 +49,11 @@ impl<T, const N: usize> MemoryMapped1DArray<T, N> {
array: address as *mut [T; N],
}
}
pub fn get(&self, n: usize) -> T {
unsafe { (&mut (*self.array)[n] as *mut T).read_volatile() }
}
pub fn set(&self, n: usize, val: T) {
unsafe { (&mut (*self.array)[n] as *mut T).write_volatile(val) }
}