Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
timer.h File Reference
#include <type.h>

Go to the source code of this file.

Data Structures

struct  time_counter_t
 

Functions

void usleep (const uint64_t time_ns)
 
void setup_timer_interrupt (void)
 
void init_timer_counter (time_counter_t *counter)
 
uint64_t get_timer_counter_count (time_counter_t *counter)
 
uint64_t get_timer_counter_count_ms (time_counter_t *counter)
 
uint64_t get_timer_counter_count_ns (time_counter_t *counter)
 

Function Documentation

◆ get_timer_counter_count()

uint64_t get_timer_counter_count ( time_counter_t * counter)

◆ get_timer_counter_count_ms()

uint64_t get_timer_counter_count_ms ( time_counter_t * counter)

Definition at line 64 of file timer.c.

References time_counter_t::current, ns2ms, vxHPETGetMainCount(), and vxHPETMinTickNs().

◆ get_timer_counter_count_ns()

uint64_t get_timer_counter_count_ns ( time_counter_t * counter)

Definition at line 69 of file timer.c.

References get_timer_counter_count(), and vxHPETMinTickNs().

Referenced by vxAPICTimerCalibrationUsingHPET().

◆ init_timer_counter()

void init_timer_counter ( time_counter_t * counter)

Definition at line 56 of file timer.c.

References time_counter_t::current, and vxHPETGetMainCount().

Referenced by vxAPICTimerCalibrationUsingHPET().

◆ setup_timer_interrupt()

void setup_timer_interrupt ( void )

Definition at line 26 of file timer.c.

References get_current_core_cpuid(), INTERRUPT_ATTR_KERNEL, irq_register(), and usleep_backend().

Referenced by __attribute__(), and INIT().

◆ usleep()