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
f46d1268
Commit
f46d1268
authored
Dec 04, 2012
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell: adding command for getting RX bitslide value
parent
35f12f60
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
1 deletion
+12
-1
endpoint.c
dev/endpoint.c
+6
-0
wrpc.in
doc/wrpc.in
+1
-0
endpoint.h
include/endpoint.h
+1
-0
cmd_stat.c
shell/cmd_stat.c
+4
-1
No files found.
dev/endpoint.c
View file @
f46d1268
...
...
@@ -148,6 +148,12 @@ int ep_link_up(uint16_t * lpa)
return
(
msr
&
flags
)
==
flags
?
1
:
0
;
}
int
ep_get_bitslide
()
{
return
PICOS_PER_SERIAL_BIT
*
MDIO_WR_SPEC_BSLIDE_R
(
pcs_read
(
MDIO_REG_WR_SPEC
));
}
/* Returns the TX/RX latencies. They are valid only when the link is up. */
int
ep_get_deltas
(
uint32_t
*
delta_tx
,
uint32_t
*
delta_rx
)
{
...
...
doc/wrpc.in
View file @
f46d1268
...
...
@@ -702,6 +702,7 @@ function to initialize SoftPll
@item @code
{
stat
}
@tab prints one line log message
@item @code
{
stat cont
}
@tab prints log message for each second
(
Esc to exit back to shell
)
@item @code
{
stat bts
}
@tab prints bitslide value for established WR Link, needed by calibration procedure
@item @code
{
ptp start
}
@tab start WR PTP daemon
@item @code
{
ptp stop
}
@tab stops WR PTP daemon
...
...
include/endpoint.h
View file @
f46d1268
...
...
@@ -22,6 +22,7 @@ void get_mac_addr(uint8_t dev_addr[]);
void
set_mac_addr
(
uint8_t
dev_addr
[]);
int
ep_enable
(
int
enabled
,
int
autoneg
);
int
ep_link_up
(
uint16_t
*
lpa
);
int
ep_get_bitslide
();
int
ep_get_deltas
(
uint32_t
*
delta_tx
,
uint32_t
*
delta_rx
);
int
ep_get_psval
(
int32_t
*
psval
);
int
ep_cal_pattern_enable
();
...
...
shell/cmd_stat.c
View file @
f46d1268
#include "shell.h"
#include "endpoint.h"
#include <string.h>
#include <wrc.h>
...
...
@@ -6,7 +7,9 @@ int cmd_stat(const char *args[])
{
if
(
!
strcasecmp
(
args
[
0
],
"cont"
))
{
wrc_ui_mode
=
UI_STAT_MODE
;
}
else
}
else
if
(
!
strcasecmp
(
args
[
0
],
"bts"
))
mprintf
(
"%d ps
\n
"
,
ep_get_bitslide
());
else
wrc_log_stats
(
1
);
return
0
;
...
...
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