mirror of
https://github.com/iceHtwoO/novaOS.git
synced 2026-04-17 04:32:27 +00:00
migrate read and write volatile to a function
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
use crate::mmio_read;
|
||||
|
||||
const TIMER_CLO: u32 = 0x3F00_3004;
|
||||
|
||||
fn read_clo() -> u32 {
|
||||
unsafe { return core::ptr::read_volatile(TIMER_CLO as *const u32) }
|
||||
return mmio_read(TIMER_CLO);
|
||||
}
|
||||
|
||||
/// Sleep for `us` microseconds
|
||||
|
||||
Reference in New Issue
Block a user