22 lines
306 B
C
22 lines
306 B
C
|
/*#include <drivers/isr.h>
|
||
|
#include <drivers/irq.h>
|
||
|
|
||
|
#include <drivers/timer.h>
|
||
|
|
||
|
volatile uint32_t tick_count = 0;
|
||
|
|
||
|
void irq0_handler(regs_t* regs)
|
||
|
{
|
||
|
tick_count++;
|
||
|
}
|
||
|
|
||
|
void timer_sleep(uint32_t ms)
|
||
|
{
|
||
|
uint32_t target = tick_count + ms;
|
||
|
while (tick_count < target)
|
||
|
{
|
||
|
asm volatile("hlt");
|
||
|
}
|
||
|
}
|
||
|
*/
|