Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wrpc-sw
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
hdl-core-lib
wr-cores
wrpc-sw
Commits
7a73c072
Commit
7a73c072
authored
12 years ago
by
Grzegorz Daniluk
Browse files
Options
Downloads
Patches
Plain Diff
shell: add command to enable/disable phase tracking
parent
db67ddf1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
include/shell.h
+1
-0
1 addition, 0 deletions
include/shell.h
shell/cmd_ptrack.c
+30
-0
30 additions, 0 deletions
shell/cmd_ptrack.c
shell/shell.c
+1
-0
1 addition, 0 deletions
shell/shell.c
shell/shell.mk
+2
-1
2 additions, 1 deletion
shell/shell.mk
wrc_main.c
+1
-0
1 addition, 0 deletions
wrc_main.c
with
35 additions
and
1 deletion
include/shell.h
+
1
−
0
View file @
7a73c072
...
...
@@ -25,6 +25,7 @@ int cmd_verbose(const char *args[]);
int
cmd_sdb
(
const
char
*
args
[]);
int
cmd_mac
(
const
char
*
args
[]);
int
cmd_init
(
const
char
*
args
[]);
int
cmd_ptrack
(
const
char
*
args
[]);
int
cmd_env
(
const
char
*
args
[]);
int
cmd_saveenv
(
const
char
*
args
[]);
...
...
This diff is collapsed.
Click to expand it.
shell/cmd_ptrack.c
0 → 100644
+
30
−
0
View file @
7a73c072
/*
* This work is part of the White Rabbit project
*
* Copyright (C) 2013 CERN (www.cern.ch)
* Author: Grzegorz Daniluk <grzegorz.daniluk@cern.ch>
*
* Released according to the GNU GPL, version 2 or any later version.
*/
#include
<string.h>
#include
<wrc.h>
#include
"shell.h"
#include
"ptpd.h"
extern
int
wrc_phase_tracking
;
int
cmd_ptrack
(
const
char
*
args
[])
{
if
(
args
[
0
]
&&
!
strcasecmp
(
args
[
0
],
"enable"
))
{
wr_servo_enable_tracking
(
1
);
wrc_phase_tracking
=
1
;
}
else
if
(
args
[
0
]
&&
!
strcasecmp
(
args
[
0
],
"disable"
))
{
wr_servo_enable_tracking
(
0
);
wrc_phase_tracking
=
0
;
}
mprintf
(
"phase tracking %s
\n
"
,
wrc_phase_tracking
?
"ON"
:
"OFF"
);
return
0
;
}
This diff is collapsed.
Click to expand it.
shell/shell.c
+
1
−
0
View file @
7a73c072
...
...
@@ -58,6 +58,7 @@ static const struct shell_cmd cmds_list[] = {
{
"time"
,
cmd_time
},
{
"sfp"
,
cmd_sfp
},
{
"init"
,
cmd_init
},
{
"ptrack"
,
cmd_ptrack
},
#ifdef CONFIG_ETHERBONE
{
"ip"
,
cmd_ip
},
#endif
...
...
This diff is collapsed.
Click to expand it.
shell/shell.mk
+
2
−
1
View file @
7a73c072
...
...
@@ -12,7 +12,8 @@ obj-y += \
shell/cmd_gui.o
\
shell/cmd_sdb.o
\
shell/cmd_mac.o
\
shell/cmd_init.o
shell/cmd_init.o
\
shell/cmd_ptrack.o
obj-$(CONFIG_ETHERBONE)
+=
shell/cmd_ip.o
obj-$(CONFIG_PPSI_RUNTIME_VERBOSITY)
+=
shell/cmd_verbose.o
This diff is collapsed.
Click to expand it.
wrc_main.c
+
1
−
0
View file @
7a73c072
...
...
@@ -32,6 +32,7 @@
#include
"wrc_ptp.h"
int
wrc_ui_mode
=
UI_SHELL_MODE
;
int
wrc_phase_tracking
=
1
;
///////////////////////////////////
//Calibration data (from EEPROM if available)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment