Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Software for White Rabbit PTP Core
Manage
Activity
Members
Labels
Plan
Issues
39
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
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
Projects
Software for White Rabbit PTP Core
Commits
41c3a04f
Commit
41c3a04f
authored
12 years ago
by
Alessandro Rubini
Browse files
Options
Downloads
Patches
Plain Diff
warnings: tests/measure_t24p.c (not complete)
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
a908b16b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/wrc.h
+2
-0
2 additions, 0 deletions
include/wrc.h
tests/measure_t24p.c
+6
-2
6 additions, 2 deletions
tests/measure_t24p.c
with
8 additions
and
2 deletions
include/wrc.h
+
2
−
0
View file @
41c3a04f
...
...
@@ -21,5 +21,7 @@ extern int abs(int val);
/* The following from ptp-noposix */
extern
void
wr_servo_reset
(
void
);
void
update_rx_queues
(
void
);
void
spll_enable_ptracker
(
int
ref_channel
,
int
enable
);
#endif
/* __WRC_H__ */
This diff is collapsed.
Click to expand it.
tests/measure_t24p.c
+
6
−
2
View file @
41c3a04f
#include
<stdio.h>
#include
<inttypes.h>
#include
<stdarg.h>
#include
<wrc.h>
#define INET_ADDRSTRLEN 16
#include
"syscon.h"
...
...
@@ -17,10 +18,12 @@
#include
"ptpd.h"
#if 0 /* not used, currently */
static int get_bitslide(int ep)
{
return (pcs_read(16) >> 4) & 0x1f;
}
#endif
struct
meas_entry
{
int
delta_ns
;
...
...
@@ -42,7 +45,7 @@ static int meas_phase_range(wr_socket_t * sock, int phase_min, int phase_max,
int
phase_step
,
struct
meas_entry
*
results
)
{
char
buf
[
128
];
wr_timestamp_t
ts_tx
,
ts_rx
,
ts_sync
;
wr_timestamp_t
ts_rx
,
ts_sync
;
wr_sockaddr_t
from
;
MsgHeader
mhdr
;
int
setpoint
=
phase_min
,
i
=
0
,
phase
;
...
...
@@ -100,6 +103,7 @@ static int find_transition(struct meas_entry *results, int n, int positive)
&&
(
results
[(
i
+
1
)
%
n
].
ahead
==
positive
))
return
i
;
}
return
-
1
;
}
extern
void
ptpd_netif_set_phase_transition
(
wr_socket_t
*
sock
,
int
phase
);
...
...
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