OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [sim/] [timer.h] - Blame information for rev 219

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 hellwig
/*
2
 * timer.h -- timer simulation
3
 */
4
 
5
 
6
#ifndef _TIMER_H_
7
#define _TIMER_H_
8
 
9
 
10
#define TIMER_CTRL      0        /* timer control register */
11
#define TIMER_DIVISOR   4       /* timer divisor register */
12 25 hellwig
#define TIMER_COUNTER   8       /* timer counter register */
13 8 hellwig
 
14
#define TIMER_EXP       0x01    /* timer has expired */
15
#define TIMER_IEN       0x02    /* enable timer interrupt */
16
 
17 25 hellwig
#define NUMBER_TIMERS   20      /* number of simulation timers */
18
#define NUMBER_TMRCNT   2       /* number of timer/counters */
19 8 hellwig
 
20
 
21
Word timerRead(Word addr);
22
void timerWrite(Word addr, Word data);
23
 
24
void timerTick(void);
25 25 hellwig
void timerStart(int usec, void (*callback)(int param), int param);
26 8 hellwig
 
27
void timerReset(void);
28
void timerInit(void);
29
void timerExit(void);
30
 
31
 
32
#endif /* _TIMER_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.