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
7
Merge Requests
7
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
e22b17ba
Commit
e22b17ba
authored
Nov 25, 2012
by
Aurelio Colosimo
Committed by
Alessandro Rubini
Feb 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests/measure_t24p.c: support for ppsi implemented
Signed-off-by:
Aurelio Colosimo
<
aurelio@aureliocolosimo.it
>
parent
2ec584a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
measure_t24p.c
tests/measure_t24p.c
+10
-2
No files found.
tests/measure_t24p.c
View file @
e22b17ba
...
...
@@ -24,7 +24,15 @@
#undef PACKED
#include "ptpd_netif.h"
#ifdef CONFIG_PPSI
#include <ppsi/ppsi.h>
#define UNPACK_HEADER msg_unpack_header
#define UNPACK_FOLLOWUP msg_unpack_follow_up
#else
#include "ptpd.h"
#define UNPACK_HEADER msgUnpackHeader
#define UNPACK_FOLLOWUP msgUnpackFollowUp
#endif
#if 0 /* not used, currently */
static int get_bitslide(int ep)
...
...
@@ -74,12 +82,12 @@ static int meas_phase_range(wr_socket_t * sock, int phase_min, int phase_max,
int
n
=
ptpd_netif_recvfrom
(
sock
,
&
from
,
buf
,
128
,
&
ts_rx
);
if
(
n
>
0
)
{
msgUnpackHeader
(
buf
,
&
mhdr
);
UNPACK_HEADER
(
buf
,
&
mhdr
);
if
(
mhdr
.
messageType
==
0
)
ts_sync
=
ts_rx
;
else
if
(
mhdr
.
messageType
==
8
&&
ts_sync
.
correct
)
{
MsgFollowUp
fup
;
msgUnpackFollowUp
(
buf
,
&
fup
);
UNPACK_FOLLOWUP
(
buf
,
&
fup
);
mprintf
(
"Shift: %d/%dps [step %dps]
\r
"
,
setpoint
,
phase_max
,
phase_step
);
...
...
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