Turnstone Operating System
Loading...
Searching...
No Matches
hpet.h File Reference

High Precision Event Timer (HPET) support. More...

#include <types.h>
#include <acpi.h>
#include <utils.h>

Classes

struct  hpet_address_t
 HPET address structure. More...
 
struct  hpet_table_t
 ACPI HPET table structure. More...
 
union  hpet_capabilities_t
 HPET capabilities register. More...
 
struct  hpet_congfiguration_t
 HPET configuration register. More...
 
struct  hpet_interrupt_status_t
 HPET interrupt status register. More...
 
union  hpet_timer_configuration_t
 HPET timer configuration register. More...
 
struct  hpet_t
 HPET structure. More...
 

Macros

#define ___HPET_H   0
 
#define HPET_INTERRUPT_STATUS_OF(x, i)   ((x->interrupt_status.status >> i ) & 1)
 

Typedefs

typedef struct hpet_address_t hpet_address_t
 HPET address structure.
 
typedef struct hpet_table_t hpet_table_t
 ACPI HPET table structure.
 
typedef union hpet_capabilities_t hpet_capabilities_t
 HPET capabilities register.
 
typedef struct hpet_congfiguration_t hpet_configuration_t
 HPET configuration register.
 
typedef struct hpet_interrupt_status_t hpet_interrupt_status_t
 HPET interrupt status register.
 
typedef union hpet_timer_configuration_t hpet_timer_configuration_t
 HPET timer configuration register.
 
typedef struct hpet_t hpet_t
 HPET structure.
 

Functions

int8_t hpet_init (void)
 initializes hpet More...
 

Variables

boolean_t hpet_enabled
 stores if hpet is enabled More...
 

Detailed Description

High Precision Event Timer (HPET) support.

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Macro Definition Documentation

◆ ___HPET_H

#define ___HPET_H   0

macro for avoiding multiple inclusion

◆ HPET_INTERRUPT_STATUS_OF

#define HPET_INTERRUPT_STATUS_OF (   x,
 
)    ((x->interrupt_status.status >> i ) & 1)

macro for getting interrupt status of timer i of hpet x

Function Documentation

◆ hpet_init()

int8_t hpet_init ( void  )

initializes hpet

Returns
0 if hpet was initialized, -1 otherwise

Variable Documentation

◆ hpet_enabled

boolean_t hpet_enabled
extern

stores if hpet is enabled

variable for hpet enabled flag