forked from AbleOS/ableos
turned magic number into constant
This commit is contained in:
parent
1ce64c6e35
commit
f0ca90ae25
|
@ -177,8 +177,10 @@ pub fn init_idt() {
|
|||
IDT.load();
|
||||
}
|
||||
|
||||
const PIT_MAX_FREQ: u32 = 1193180;
|
||||
|
||||
pub fn set_pit_frequency(pit: u16, freq: u32) {
|
||||
let ret = (1193180 / freq).try_into();
|
||||
let ret = (PIT_MAX_FREQ / freq).try_into();
|
||||
|
||||
let divisor: u16 = match ret {
|
||||
Ok(div) => div,
|
||||
|
|
Loading…
Reference in a new issue