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
6
Merge Requests
6
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
d687940f
Commit
d687940f
authored
Jan 05, 2021
by
Adam Wujek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/wrpc-dump: add dump_type_timing_mode
Signed-off-by:
Adam Wujek
<
adam.wujek@creotech.pl
>
parent
99a6b4b7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
2 deletions
+20
-2
dump-info.c
dump-info.c
+1
-1
dump-info.h
include/dump-info.h
+2
-0
Makefile
tools/Makefile
+1
-1
wrpc-dump.c
tools/wrpc-dump.c
+16
-0
No files found.
dump-info.c
View file @
d687940f
...
...
@@ -316,7 +316,7 @@ struct dump_info dump_info[] = {
#undef DUMP_STRUCT
#define DUMP_STRUCT struct wrpc_arch_data_t
DUMP_HEADER
(
"wrpc_arch_data_t"
),
DUMP_FIELD
(
int
,
timingMode
),
DUMP_FIELD
(
timing_mode
,
timingMode
),
#endif
#undef DUMP_STRUCT
...
...
include/dump-info.h
View file @
d687940f
...
...
@@ -51,6 +51,7 @@ enum dump_type {
dump_type_ip_address
,
dump_type_delay_mechanism
,
dump_type_protocol_extension
,
dump_type_timing_mode
,
};
/* because of the sizeof later on, we need these typedefs */
...
...
@@ -65,6 +66,7 @@ typedef Boolean yes_no_Boolean;
typedef
uint8_t
yes_no
;
typedef
int
delay_mechanism
;
typedef
int
protocol_extension
;
typedef
int
timing_mode
;
/*
* This is generated with the target compiler, and then linked
...
...
tools/Makefile
View file @
d687940f
...
...
@@ -54,7 +54,7 @@ sdb-wrpc.bin: sdbfs
$(SDBFS)
/gensdbfs
$<
$@
wrpc-dump
:
wrpc-dump.c dump-info-host.o time_lib.o
$(CC)
$(CFLAGS)
-include
$(AUTOCONF)
-include
$(AUTOCONF_PPSI)
-I
../ppsi/include
-I
../ppsi/arch-wrpc/include
-I
..
\
$(CC)
$(CFLAGS)
-include
$(AUTOCONF)
-include
$(AUTOCONF_PPSI)
-I
../ppsi/include
-I
../ppsi/arch-wrpc
-I
../ppsi/arch-wrpc
/include
-I
..
\
-I
../softpll
\
$^
-o
$@
...
...
tools/wrpc-dump.c
View file @
d687940f
...
...
@@ -17,6 +17,7 @@
#include <arch/lm32/crt0.h>
#include <dump-info.h>
#include <wrpc.h>
#include "time_lib.h"
/* We have a problem: ppsi is built for wrpc, so it has ntoh[sl] wrong */
...
...
@@ -290,6 +291,21 @@ void dump_one_field(void *addr, struct dump_info *info, char *info_prefix)
print_str
(
char_p
);
printf
(
"
\n
"
);
break
;
case
dump_type_timing_mode
:
i
=
wrpc_get_i32
(
p
);
switch
(
i
)
{
ENUM_TO_P_IN_CASE
(
WRC_MODE_UNKNOWN
,
char_p
);
ENUM_TO_P_IN_CASE
(
WRC_MODE_GM
,
char_p
);
ENUM_TO_P_IN_CASE
(
WRC_MODE_MASTER
,
char_p
);
ENUM_TO_P_IN_CASE
(
WRC_MODE_SLAVE
,
char_p
);
ENUM_TO_P_IN_CASE
(
WRC_MODE_ABSCAL
,
char_p
);
default:
char_p
=
"Unknown"
;
}
printf
(
"%d"
,
i
);
print_str
(
char_p
);
printf
(
"
\n
"
);
break
;
}
}
void
dump_many_fields
(
void
*
addr
,
char
*
name
,
char
*
prefix
)
...
...
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