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
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
b8694a13
Commit
b8694a13
authored
Apr 15, 2021
by
Juan David González Cobas
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
experiment: add proto call to read latency from reg
parent
82ba0a2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
board.c
boards/ertm14/board.c
+5
-1
psnmp-proto.h
boards/ertm14/psnmp-proto.h
+8
-0
No files found.
boards/ertm14/board.c
View file @
b8694a13
...
...
@@ -1192,6 +1192,7 @@ static int ertm_process_psnmp(struct uart_packet *rx_pkt, struct uart_packet *tx
struct
ertm14_protocol_op
*
op
;
struct
ertm14_version_info
*
ver
;
uint8_t
*
fver
,
mode
;
uint32_t
*
latency
;
/* return board config in case of bad opcode */
if
((
op
=
get_proto_op
(
opcode
))
==
NULL
)
...
...
@@ -1257,7 +1258,10 @@ static int ertm_process_psnmp(struct uart_packet *rx_pkt, struct uart_packet *tx
}
else
if
(
mode
==
WRC_MODE_UNKNOWN
)
wrc_ptp_stop
();
break
;
case
ertm14_get_streamers_latency
:
latency
=
(
uint32_t
*
)
&
tx_pkt
->
payload
[
op
->
offset2
];
*
latency
=
streamers_get_rx_latency
();
break
;
case
0x5a
:
tx_pkt
->
length
=
rx_pkt
->
length
;
tx_pkt
->
length
=
1
;
/* no time to reply */
...
...
boards/ertm14/psnmp-proto.h
View file @
b8694a13
...
...
@@ -19,6 +19,7 @@
#define ertm14_get_sensors 0x20
#define ertm14_get_version_info 0x21
#define ertm14_get_fpga_info 0x22
#define ertm14_get_streamers_latency 0x23
static
struct
ertm14_protocol_op
{
int8_t
opcode
;
...
...
@@ -104,6 +105,13 @@ static struct ertm14_protocol_op {
.
offset2
=
1
,
.
length2
=
0
,
},
{
.
opcode
=
ertm14_get_streamers_latency
,
.
offset1
=
1
,
.
length1
=
0
,
.
offset2
=
0
,
.
length2
=
sizeof
(
uint32_t
),
},
{
.
opcode
=
-
1
,
},
...
...
Juan David González Cobas
@dcobas
mentioned in commit
e33c5cfe
·
Apr 27, 2021
mentioned in commit
e33c5cfe
mentioned in commit e33c5cfe7a02f2c61a43a198bc5b44fc6dea7032
Toggle commit list
Juan David González Cobas
@dcobas
mentioned in commit
ab763e4e
·
Mar 22, 2022
mentioned in commit
ab763e4e
mentioned in commit ab763e4e07ca5e87d28d4f977f87052c49e86ac3
Toggle commit list
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