Files
Espresso/drivers/timer.c

22 lines
306 B
C
Raw Normal View History

2025-06-13 18:03:39 -05:00
/*#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");
}
}
*/