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
powerpc
include
bsp
tictac.h
Go to the documentation of this file.
1
9
/*
10
* Copyright (c) 2008
11
* Embedded Brains GmbH
12
* Obere Lagerstr. 30
13
* D-82178 Puchheim
14
* Germany
15
* rtems@embedded-brains.de
16
*
17
* The license and distribution terms for this file may be
18
* found in the file LICENSE in this distribution or at
19
* http://www.rtems.org/license/LICENSE.
20
*/
21
25
static
inline
void
tic(
void
)
26
{
27
uint32_t tmp;
28
asm
volatile
(
29
"mftb 0;"
30
"stw 0, ppc_tic_tac@sdarel(13);"
31
:
"=r"
(tmp)
32
);
33
}
34
38
static
inline
uint32_t tac(
void
)
39
{
40
uint32_t ticks;
41
uint32_t tmp;
42
asm
volatile
(
43
"mftb %0;"
44
"lwz %1, ppc_tic_tac@sdarel(13);"
45
"subf %0, %1, %0;"
46
:
"=r"
(ticks),
"=r"
(tmp)
47
);
48
return
ticks;
49
}
50
54
static
inline
void
boom(
void
)
55
{
56
uint32_t tmp;
57
asm
volatile
(
58
"mftb 0;"
59
"stw 0, ppc_boom_bam@sdarel(13);"
60
:
"=r"
(tmp)
61
);
62
}
63
67
static
inline
uint32_t bam(
void
)
68
{
69
uint32_t ticks;
70
uint32_t tmp;
71
asm
volatile
(
72
"mftb %0;"
73
"lwz %1, ppc_boom_bam@sdarel(13);"
74
"subf %0, %1, %0;"
75
:
"=r"
(ticks),
"=r"
(tmp)
76
);
77
return
ticks;
78
}
Generated by
1.9.4