From c31d465a62fbc0ec3194838db4745585471c1050 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 21 Sep 2019 18:07:07 +0200 Subject: Added ACPI based shutdown command --- src/kernel/timer/timer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/kernel/timer/timer.c') diff --git a/src/kernel/timer/timer.c b/src/kernel/timer/timer.c index 38f5be6..45b254e 100644 --- a/src/kernel/timer/timer.c +++ b/src/kernel/timer/timer.c @@ -5,9 +5,9 @@ volatile unsigned int timer_ticks = 0; void timer_phase(int hz) { int divisor = 1193180 / hz; - send(0x43, 0x36); // 01 10 11 0b // CTR, RW, MODE, BCD - send(0x40, divisor & 0xFF); - send(0x40, divisor >> 8); + send_b(0x43, 0x36); // 01 10 11 0b // CTR, RW, MODE, BCD + send_b(0x40, divisor & 0xFF); + send_b(0x40, divisor >> 8); } // Executed 100 times per second @@ -21,7 +21,7 @@ void timer_wait(int ticks) { eticks = timer_ticks + ticks; while (timer_ticks < eticks) { - __asm__ __volatile__ ("sti//hlt//cli"); + asm volatile ("sti//hlt//cli"); } } -- cgit v1.2.3