UNIX xv6 (rev8, 9/1/15)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions
timer.c File Reference
#include "types.h"
#include "defs.h"
#include "traps.h"
#include "x86.h"

Go to the source code of this file.

Macros

#define IO_TIMER1   0x040
 
#define TIMER_FREQ   1193182
 
#define TIMER_DIV(x)   ((TIMER_FREQ+(x)/2)/(x))
 
#define TIMER_MODE   (IO_TIMER1 + 3)
 
#define TIMER_SEL0   0x00
 
#define TIMER_RATEGEN   0x04
 
#define TIMER_16BIT   0x30
 

Functions

void timerinit (void)
 

Macro Definition Documentation

#define IO_TIMER1   0x040

Definition at line 10 of file timer.c.

#define TIMER_16BIT   0x30

Definition at line 22 of file timer.c.

#define TIMER_DIV (   x)    ((TIMER_FREQ+(x)/2)/(x))

Definition at line 17 of file timer.c.

#define TIMER_FREQ   1193182

Definition at line 16 of file timer.c.

#define TIMER_MODE   (IO_TIMER1 + 3)

Definition at line 19 of file timer.c.

#define TIMER_RATEGEN   0x04

Definition at line 21 of file timer.c.

#define TIMER_SEL0   0x00

Definition at line 20 of file timer.c.

Function Documentation

void timerinit ( void  )

Definition at line 25 of file timer.c.