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
4
Merge Requests
4
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
e8a6bb64
Commit
e8a6bb64
authored
Dec 14, 2011
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrcore_v2: wrc_main uses syscon driver
parent
0e272874
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
wrc_main.c
wrc_main.c
+4
-9
No files found.
wrc_main.c
View file @
e8a6bb64
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <stdarg.h>
#include <stdarg.h>
#include "
gpio
.h"
#include "
syscon
.h"
#include "uart.h"
#include "uart.h"
#include "endpoint.h"
#include "endpoint.h"
#include "minic.h"
#include "minic.h"
...
@@ -99,7 +99,7 @@ int last_btn0;
...
@@ -99,7 +99,7 @@ int last_btn0;
int
button_pressed
()
int
button_pressed
()
{
{
int
p
;
int
p
;
int
btn0
=
gpio_in
(
GPIO_
PIN_
BTN1
);
int
btn0
=
gpio_in
(
GPIO_BTN1
);
p
=!
btn0
&&
last_btn0
;
p
=!
btn0
&&
last_btn0
;
last_btn0
=
btn0
;
last_btn0
=
btn0
;
return
p
;
return
p
;
...
@@ -179,11 +179,6 @@ void wrc_initialize()
...
@@ -179,11 +179,6 @@ void wrc_initialize()
netStartup
();
netStartup
();
gpio_dir
(
GPIO_PIN_BTN1
,
0
);
gpio_dir
(
GPIO_PIN_LED_LINK
,
1
);
gpio_out
(
GPIO_PIN_LED_LINK
,
0
);
gpio_dir
(
GPIO_PIN_LED_STATUS
,
1
);
wr_servo_man_adjust_phase
(
-
11600
+
1700
);
wr_servo_man_adjust_phase
(
-
11600
+
1700
);
displayConfigINFO
(
&
rtOpts
);
displayConfigINFO
(
&
rtOpts
);
...
@@ -206,12 +201,12 @@ int wrc_check_link()
...
@@ -206,12 +201,12 @@ int wrc_check_link()
if
(
!
prev_link_state
&&
link_state
)
if
(
!
prev_link_state
&&
link_state
)
{
{
TRACE_DEV
(
"Link up.
\n
"
);
TRACE_DEV
(
"Link up.
\n
"
);
gpio_out
(
GPIO_
PIN_
LED_LINK
,
1
);
gpio_out
(
GPIO_LED_LINK
,
1
);
rv
=
LINK_WENT_UP
;
rv
=
LINK_WENT_UP
;
}
else
if
(
prev_link_state
&&
!
link_state
)
}
else
if
(
prev_link_state
&&
!
link_state
)
{
{
TRACE_DEV
(
"Link down.
\n
"
);
TRACE_DEV
(
"Link down.
\n
"
);
gpio_out
(
GPIO_
PIN_
LED_LINK
,
0
);
gpio_out
(
GPIO_LED_LINK
,
0
);
rv
=
LINK_WENT_DOWN
;
rv
=
LINK_WENT_DOWN
;
}
else
rv
=
(
link_state
?
LINK_UP
:
LINK_DOWN
);
}
else
rv
=
(
link_state
?
LINK_UP
:
LINK_DOWN
);
prev_link_state
=
link_state
;
prev_link_state
=
link_state
;
...
...
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