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
29
Issues
29
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
41c3a04f
Commit
41c3a04f
authored
Oct 20, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
warnings: tests/measure_t24p.c (not complete)
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
a908b16b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
wrc.h
include/wrc.h
+2
-0
measure_t24p.c
tests/measure_t24p.c
+6
-2
No files found.
include/wrc.h
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__ */
tests/measure_t24p.c
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
);
...
...
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