Skip to main content

strat9_kernel/hardware/timer/
mod.rs

1// Timer subsystem
2//
3// Provides:
4// - HPET (High Precision Event Timer)
5// - RTC (Real Time Clock)
6// - PIT (Programmable Interval Timer) - legacy
7
8pub mod hpet;
9pub mod rtc;
10
11/// Performs the init operation.
12pub fn init() {
13    log::info!("[TIMER] Initializing timers...");
14
15    // Initialize HPET first (high precision)
16    if let Err(e) = hpet::init() {
17        log::warn!("[TIMER] HPET init failed: {}", e);
18    }
19
20    // Initialize RTC (real-time clock)
21    if let Err(e) = rtc::init() {
22        log::warn!("[TIMER] RTC init failed: {}", e);
23    }
24
25    log::info!("[TIMER] Timer subsystem initialized");
26}