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
32
Issues
32
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
7a73c072
Commit
7a73c072
authored
Mar 12, 2013
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell: add command to enable/disable phase tracking
parent
db67ddf1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
1 deletion
+35
-1
shell.h
include/shell.h
+1
-0
cmd_ptrack.c
shell/cmd_ptrack.c
+30
-0
shell.c
shell/shell.c
+1
-0
shell.mk
shell/shell.mk
+2
-1
wrc_main.c
wrc_main.c
+1
-0
No files found.
include/shell.h
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
[]);
...
...
shell/cmd_ptrack.c
0 → 100644
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
;
}
shell/shell.c
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
...
...
shell/shell.mk
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
wrc_main.c
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)
...
...
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