source: rtems/c/src/lib/libbsp/m68k/mcf5329/timer/timer.c @ f68401e

4.115
Last change on this file since f68401e was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 874 bytes
Line 
1/*
2 *  Timer Init
3 *
4 *  Use the last DMA timer (DTIM3) as the diagnostic timer.
5 *
6 *  Author: W. Eric Norum <norume@aps.anl.gov>
7 *
8 *  COPYRIGHT (c) 2005.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.com/license/LICENSE.
14 */
15
16#include <rtems.h>
17#include <rtems/btimer.h>
18#include <bsp.h>
19
20void benchmark_timer_initialize(void)
21{
22  uint32_t preScaleDivisor = bsp_get_BUS_clock_speed() / 1000000;
23
24  MCF_DTIM3_DTMR = 0;
25  MCF_DTIM3_DTMR = MCF_DTIM_DTMR_PS(preScaleDivisor - 1) |
26    MCF_DTIM_DTMR_CLK_DIV1 | MCF_DTIM_DTMR_RST;
27}
28
29/*
30 * Return timer value in microsecond units
31 */
32uint32_t benchmark_timer_read(void)
33{
34  return MCF_DTIM3_DTCN;
35}
36
37void benchmark_timer_disable_subtracting_average_overhead(bool find_flag)
38{
39}
Note: See TracBrowser for help on using the repository browser.