migrate read and write volatile to a function

This commit is contained in:
2025-06-08 20:10:55 +02:00
parent 5f85a40f13
commit 8c193f5c15
5 changed files with 110 additions and 126 deletions

View File

@@ -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