RTEMS
5.2
Toggle main menu visibility
Main Page
Related Pages
Modules
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
v
w
Typedefs
a
b
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
u
v
w
x
Enumerations
a
b
c
e
h
i
l
m
o
p
q
r
s
t
w
Enumerator
a
c
d
h
i
l
m
p
r
s
t
w
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
bsps
mips
jmr3904
include
tm27.h
Go to the documentation of this file.
1
5
/*
6
* The license and distribution terms for this file may be
7
* found in the file LICENSE in this distribution or at
8
* http://www.rtems.org/license/LICENSE.
9
*/
10
11
#ifndef _RTEMS_TMTEST27
12
#error "This is an RTEMS internal file you must not include directly."
13
#endif
14
15
#ifndef __tm27_h
16
#define __tm27_h
17
18
/*
19
* Define the interrupt mechanism for Time Test 27
20
*/
21
22
#include <bsp/irq.h>
23
24
#define MUST_WAIT_FOR_INTERRUPT 1
25
26
#define Install_tm27_vector( handler ) \
27
rtems_interrupt_handler_install( \
28
TX3904_IRQ_TMR0, "benchmark"
, 0, \
29
(rtems_interrupt_handler)handler, NULL );
30
31
#define Cause_tm27_intr() \
32
do { \
33
uint32_t _clicks = 20; \
34
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CCDR, 0x3 ); \
35
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CPRA, _clicks ); \
36
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_TISR, 0x00 ); \
37
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_ITMR, 0x8001 ); \
38
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_TCR, 0xC0 ); \
39
*((volatile uint32_t*) 0xFFFFC01C) = 0x00000700; \
40
} while(0)
41
42
#define Clear_tm27_intr() \
43
do { \
44
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_ITMR, 0x0001 ); \
45
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CCDR, 0x3 ); \
46
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_TISR, 0x00 ); \
47
} while(0)
48
49
#define Lower_tm27_intr() \
50
mips_enable_in_interrupt_mask( 0xff01 );
51
52
#endif
Generated by
1.9.4