4.104.114.95
Last change
on this file since 35f52a6 was
35f52a6,
checked in by Joel Sherrill <joel.sherrill@…>, on 08/31/08 at 16:07:58
|
2008-08-31 Joel Sherrill <joel.sherrill@…>
- timer/timer.c: Rename timer driver methods to follow RTEMS
programming conventions.
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | |
---|
2 | /* |
---|
3 | * Timer Init |
---|
4 | * |
---|
5 | * Use the last DMA timer (DTIM3) as the diagnostic timer. |
---|
6 | * |
---|
7 | * Author: W. Eric Norum <norume@aps.anl.gov> |
---|
8 | * |
---|
9 | * COPYRIGHT (c) 2005. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.com/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #include <rtems.h> |
---|
18 | #include <bsp.h> |
---|
19 | |
---|
20 | void benchmark_timerinitialize(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 | */ |
---|
32 | int benchmark_timerread(void) |
---|
33 | { |
---|
34 | return MCF_DTIM3_DTCN; |
---|
35 | } |
---|
36 | |
---|
37 | /* |
---|
38 | * Empty function call used in loops to measure basic cost of looping |
---|
39 | * in Timing Test Suite. |
---|
40 | */ |
---|
41 | rtems_status_code benchmark_timerempty_function(void) |
---|
42 | { |
---|
43 | return RTEMS_SUCCESSFUL; |
---|
44 | } |
---|
45 | |
---|
46 | void benchmark_timerdisable_subtracting_average_overhead(rtems_boolean find_flag) |
---|
47 | { |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.