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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [testbench/] [uos/] [tick.c] - Diff between revs 343 and 499

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

Rev 343 Rev 499
Line 27... Line 27...
  /* Save tick timer period and inform routine */
  /* Save tick timer period and inform routine */
  tick_period = period;
  tick_period = period;
  tick_inf = inf;
  tick_inf = inf;
 
 
  /* Add interrupt handler */
  /* Add interrupt handler */
  int_add(V_TICK, tick_int, 0/*, INT_HIGH_PRI*/);
  int_add(V_TICK, tick_int, 0, INT_HIGH_PRI);
 
 
  /* Set counter period, enable timer and interrupt */
  /* Set counter period, enable timer and interrupt */
  mtspr(SPR_TTMR, SPR_TTMR_IE | SPR_TTMR_CR | (period & SPR_TTMR_PERIOD));
  mtspr(SPR_TTMR, SPR_TTMR_IE | SPR_TTMR_CR | (period & SPR_TTMR_PERIOD));
 
 
  return 0;
  return 0;

powered by: WebSVN 2.1.0

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