Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
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
White Rabbit Switch - Software
Commits
5d9c5024
Commit
5d9c5024
authored
Oct 27, 2016
by
Alessandro Rubini
Committed by
Adam Wujek
Nov 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arch-wrpc: change how to get/set mechanism
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
64bcec12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
wrc_ptp_ppsi.c
arch-wrpc/wrc_ptp_ppsi.c
+14
-10
wrpc.h
arch-wrpc/wrpc.h
+1
-2
No files found.
arch-wrpc/wrc_ptp_ppsi.c
View file @
5d9c5024
...
...
@@ -189,18 +189,22 @@ int wrc_ptp_get_mode()
return
ptp_mode
;
}
void
wrc_ptp_set_sync_mech
(
int
mech
)
int
wrc_ptp_sync_mech
(
int
e2e_p2p_qry
)
{
struct
pp_instance
*
ppi
=
&
ppi_static
;
wrc_ptp_stop
();
ppi
->
mech
=
mech
;
}
int
wrc_ptp_get_sync_mech
()
{
struct
pp_instance
*
ppi
=
&
ppi_static
;
return
ppi
->
mech
;
int
running
;
switch
(
e2e_p2p_qry
)
{
case
PP_E2E_MECH
:
case
PP_P2P_MECH
:
running
=
wrc_ptp_run
(
-
1
);
wrc_ptp_run
(
0
);
ppi
->
mech
=
e2e_p2p_qry
;
wrc_ptp_run
(
running
);
return
0
;
default:
return
ppi
->
mech
;
}
}
int
wrc_ptp_start
()
...
...
arch-wrpc/wrpc.h
View file @
5d9c5024
...
...
@@ -24,8 +24,7 @@ extern int ptp_mode;
int
wrc_ptp_init
(
void
);
int
wrc_ptp_set_mode
(
int
mode
);
int
wrc_ptp_get_mode
(
void
);
void
wrc_ptp_set_sync_mech
(
int
mech
);
int
wrc_ptp_get_sync_mech
(
void
);
int
wrc_ptp_sync_mech
(
int
e2e_p2p_qry
);
int
wrc_ptp_start
(
void
);
int
wrc_ptp_stop
(
void
);
int
wrc_ptp_run
(
int
start_stop_qry
);
...
...
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