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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [sim/] [timer.h] - Diff between revs 8 and 25

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 8 Rev 25
Line 7... Line 7...
#define _TIMER_H_
#define _TIMER_H_
 
 
 
 
#define TIMER_CTRL      0        /* timer control register */
#define TIMER_CTRL      0        /* timer control register */
#define TIMER_DIVISOR   4       /* timer divisor register */
#define TIMER_DIVISOR   4       /* timer divisor register */
 
#define TIMER_COUNTER   8       /* timer counter register */
 
 
#define TIMER_EXP       0x01    /* timer has expired */
#define TIMER_EXP       0x01    /* timer has expired */
#define TIMER_IEN       0x02    /* enable timer interrupt */
#define TIMER_IEN       0x02    /* enable timer interrupt */
 
 
#define NUMBER_TIMERS   20      /* total number of simulation timers */
#define NUMBER_TIMERS   20      /* number of simulation timers */
 
#define NUMBER_TMRCNT   2       /* number of timer/counters */
 
 
 
 
Word timerRead(Word addr);
Word timerRead(Word addr);
void timerWrite(Word addr, Word data);
void timerWrite(Word addr, Word data);
 
 
void timerTick(void);
void timerTick(void);
void timerStart(int msec, void (*callback)(int param), int param);
void timerStart(int usec, void (*callback)(int param), int param);
 
 
void timerReset(void);
void timerReset(void);
void timerInit(void);
void timerInit(void);
void timerExit(void);
void timerExit(void);
 
 

powered by: WebSVN 2.1.0

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