1 #pragma once
2 
3 #include <common/glib.h>
4 #include <driver/acpi/acpi.h>
5 #include <driver/timers/rtc/rtc.h>
6 
7 #define E_HPET_INIT_FAILED 1
8 
9 #define HPET0_INTERVAL 500 // HPET0定时器的中断间隔为500us
10 int HPET_init();
11 
12 /**
13  * @brief 测定apic定时器以及tsc的频率
14  *
15  */
16 void HPET_measure_freq();
17 
18 /**
19  * @brief 启用HPET周期中断(5ms)
20  *
21  */
22 void HPET_enable();