URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 140 |
Line 1... |
Line 1... |
|
|
#include "common.h"
|
#include "common.h"
|
#include "support.h"
|
#include "support.h"
|
#include "spr_defs.h"
|
#include "spr_defs.h"
|
|
#include "spincursor.h"
|
|
|
void tick_init(void)
|
void tick_init(void)
|
{
|
{
|
mtspr(SPR_SR, SPR_SR_TEE | mfspr(SPR_SR));
|
mtspr(SPR_SR, SPR_SR_TEE | mfspr(SPR_SR));
|
mtspr(SPR_TTMR, SPR_TTMR_IE | SPR_TTMR_RT | ((IN_CLK/TICKS_PER_SEC) & SPR_TTMR_PERIOD));
|
mtspr(SPR_TTMR, SPR_TTMR_IE | SPR_TTMR_RT | ((IN_CLK/TICKS_PER_SEC) & SPR_TTMR_PERIOD));
|
Line 11... |
Line 12... |
|
|
void tick_interrupt(void)
|
void tick_interrupt(void)
|
{
|
{
|
timestamp++;
|
timestamp++;
|
mtspr(SPR_TTMR, SPR_TTMR_IE | SPR_TTMR_RT | ((IN_CLK/TICKS_PER_SEC) & SPR_TTMR_PERIOD));
|
mtspr(SPR_TTMR, SPR_TTMR_IE | SPR_TTMR_RT | ((IN_CLK/TICKS_PER_SEC) & SPR_TTMR_PERIOD));
|
|
spincursor(); // Check if we want to spin the cursor...
|
}
|
}
|
|
|
/*
|
/*
|
sleep for n timer-ticks
|
sleep for n timer-ticks
|
*/
|
*/
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.