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
a0943281
Commit
a0943281
authored
12 years ago
by
Aurelio Colosimo
Committed by
Alessandro Rubini
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ppsi_monitor.c: restored "mode: WR Slave / Master" indication
Signed-off-by:
Aurelio Colosimo
<
aurelio@aureliocolosimo.it
>
parent
ac229317
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
monitor/monitor_ppsi.c
+7
-5
7 additions, 5 deletions
monitor/monitor_ppsi.c
wrc_ptp.h
+1
-0
1 addition, 0 deletions
wrc_ptp.h
wrc_ptp_noposix.c
+2
-1
2 additions, 1 deletion
wrc_ptp_noposix.c
wrc_ptp_ppsi.c
+3
-2
3 additions, 2 deletions
wrc_ptp_ppsi.c
with
13 additions
and
8 deletions
monitor/monitor_ppsi.c
+
7
−
5
View file @
a0943281
...
...
@@ -18,6 +18,7 @@
#include
<pps_gen.h>
#include
<onewire.h>
#include
<util.h>
#include
"wrc_ptp.h"
#define UI_REFRESH_PERIOD TICS_PER_SECOND
/* 1 sec */
...
...
@@ -63,16 +64,17 @@ void wrc_mon_gui(void)
minic_get_stats
(
&
tx
,
&
rx
);
cprintf
(
C_GREY
,
"(RX: %d, TX: %d), mode: "
,
rx
,
tx
);
/* FIXME: define HEXP_PORT_MODE_WR_MASTER/SLAVE somewhere
switch (ps.mode) {
case
HEXP_PORT
_MODE_
WR_
MASTER:
switch
(
ptp_mode
)
{
case
WRC_MODE_GM
:
case
WRC
_MODE_MASTER
:
cprintf
(
C_WHITE
,
"WR Master "
);
break
;
case
HEXP_PORT
_MODE_
WR_
SLAVE:
case
WRC
_MODE_SLAVE
:
cprintf
(
C_WHITE
,
"WR Slave "
);
break
;
default:
cprintf
(
C_RED
,
"WR Unknown "
);
}
*/
if
(
ps
.
is_locked
)
cprintf
(
C_GREEN
,
"Locked "
);
...
...
This diff is collapsed.
Click to expand it.
wrc_ptp.h
+
1
−
0
View file @
a0943281
...
...
@@ -5,6 +5,7 @@
#define WRC_MODE_GM 1
#define WRC_MODE_MASTER 2
#define WRC_MODE_SLAVE 3
extern
int
ptp_mode
;
int
wrc_ptp_init
();
int
wrc_ptp_set_mode
(
int
mode
);
...
...
This diff is collapsed.
Click to expand it.
wrc_ptp_noposix.c
+
2
−
1
View file @
a0943281
...
...
@@ -58,7 +58,8 @@ static RunTimeOpts rtOpts = {
static
PtpPortDS
*
ptpPortDS
;
static
PtpClockDS
ptpClockDS
;
static
int
ptp_enabled
=
0
,
ptp_mode
=
WRC_MODE_UNKNOWN
;
int
ptp_mode
=
WRC_MODE_UNKNOWN
;
static
int
ptp_enabled
=
0
;
int
wrc_ptp_init
()
{
...
...
This diff is collapsed.
Click to expand it.
wrc_ptp_ppsi.c
+
3
−
2
View file @
a0943281
...
...
@@ -16,13 +16,14 @@
#include
<ppsi/ppsi.h>
#include
<wr-constants.h>
#include
"syscon.h"
#include
"endpoint.h"
#include
"softpll_ng.h"
#include
"wrc_ptp.h"
#include
"pps_gen.h"
#include
"uart.h"
static
int
ptp_enabled
=
0
,
ptp_mode
=
WRC_MODE_UNKNOWN
,
ptp_forced_stop
=
0
;
int
ptp_mode
=
WRC_MODE_UNKNOWN
;
static
int
ptp_enabled
=
0
,
ptp_forced_stop
=
0
;
struct
pp_instance
ppi_static
;
/* FIXME: no more static, because used in
tests/measure_t24p.c */
CONST_VERBOSITY
int
pp_diag_verbosity
=
CONFIG_PPSI_VERBOSITY
;
...
...
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