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
491ee15d
Commit
491ee15d
authored
Jan 06, 2021
by
Adam Wujek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/wrpc-dump: add dump_type_ppi_flag
Signed-off-by:
Adam Wujek
<
adam.wujek@creotech.pl
>
parent
5f32c44e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
dump-info.c
dump-info.c
+1
-1
dump-info.h
include/dump-info.h
+2
-0
wrpc-dump.c
tools/wrpc-dump.c
+19
-0
No files found.
dump-info.c
View file @
491ee15d
...
...
@@ -194,7 +194,7 @@ struct dump_info dump_info[] = {
DUMP_FIELD
(
protocol_extension
,
protocol_extension
),
DUMP_FIELD
(
pointer
,
ext_hooks
),
DUMP_FIELD
(
unsigned_long
,
d_flags
),
DUMP_FIELD
(
unsigned_char
,
flags
),
DUMP_FIELD
(
ppi_flag
,
flags
),
DUMP_FIELD
(
ppi_proto
,
proto
),
DUMP_FIELD
(
delay_mechanism
,
delayMechanism
),
DUMP_FIELD
(
pointer
,
glbs
),
...
...
include/dump-info.h
View file @
491ee15d
...
...
@@ -66,6 +66,7 @@ enum dump_type {
dump_type_wr_state
,
dump_type_ppi_profile
,
dump_type_ppi_proto
,
dump_type_ppi_flag
,
};
/* because of the sizeof later on, we need these typedefs */
...
...
@@ -95,6 +96,7 @@ typedef int pp_servo_state;
typedef
wr_state_t
wr_state
;
typedef
int
ppi_profile
;
typedef
int
ppi_proto
;
typedef
unsigned
char
ppi_flag
;
/*
* This is generated with the target compiler, and then linked
...
...
tools/wrpc-dump.c
View file @
491ee15d
...
...
@@ -137,6 +137,7 @@ void dump_one_field(void *addr, struct dump_info *info, char *info_prefix)
case
dump_type_wr_state
:
case
dump_type_ppi_profile
:
case
dump_type_ppi_proto
:
case
dump_type_ppi_flag
:
if
(
size
==
1
)
i
=
*
(
uint8_t
*
)
p
;
else
if
(
size
==
2
)
...
...
@@ -498,6 +499,24 @@ void dump_one_field(void *addr, struct dump_info *info, char *info_prefix)
print_str
(
char_p
);
printf
(
"
\n
"
);
break
;
case
dump_type_ppi_flag
:
switch
(
i
)
{
case
0
:
char_p
=
"None"
;
break
;
ENUM_TO_P_IN_CASE
(
PPI_FLAG_WAITING_FOR_F_UP
,
char_p
);
ENUM_TO_P_IN_CASE
(
PPI_FLAG_WAITING_FOR_RF_UP
,
char_p
);
case
PPI_FLAGS_WAITING
:
char_p
=
"PPI_FLAG_WAITING_FOR_F_UP | PPI_FLAG_WAITING_FOR_RF_UP"
;
break
;
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