Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
28
Issues
28
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
6d05f8ed
Commit
6d05f8ed
authored
May 02, 2012
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev/syscon.c: don't reinit the timer every time delay() function is called
parent
e86ca5d1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
syscon.c
dev/syscon.c
+3
-2
No files found.
dev/syscon.c
View file @
6d05f8ed
...
...
@@ -8,10 +8,11 @@ struct s_i2c_if i2c_if[2] = { {SYSC_GPSR_FMC_SCL, SYSC_GPSR_FMC_SDA},
***************************/
void
timer_init
(
uint32_t
enable
)
{
mprintf
(
"MEMSIZE %x
\n
"
,
syscon
->
HWFR
&
0xf
);
if
(
enable
)
syscon
->
TCR
|=
SYSC_TCR_ENABLE
;
else
syscon
->
TCR
&=
!
SYSC_TCR_ENABLE
;
syscon
->
TCR
&=
~
SYSC_TCR_ENABLE
;
}
uint32_t
timer_get_tics
()
...
...
@@ -23,7 +24,7 @@ void timer_delay(uint32_t how_long)
{
uint32_t
t_start
;
timer_init
(
1
);
//
timer_init(1);
do
{
t_start
=
timer_get_tics
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment