Commit 2b732541 authored by Adam Wujek's avatar Adam Wujek

tools/wrpc-dump: add dump_type_pp_servo_state

Signed-off-by: 's avatarAdam Wujek <adam.wujek@creotech.pl>
parent 73da2fee
......@@ -110,7 +110,7 @@ struct dump_info dump_info[] = {
DUMP_FIELD(int, reset_address),
/* Data used only by extensions */
DUMP_FIELD(int, state),
DUMP_FIELD(pp_servo_state, state),
DUMP_FIELD_SIZE(char, servo_state_name, 32),
/* Data shared with extension servo */
......
......@@ -62,6 +62,7 @@ enum dump_type {
dump_type_pp_pdstate,
dump_type_exstate,
dump_type_pp_servo_flag,
dump_type_pp_servo_state,
};
/* because of the sizeof later on, we need these typedefs */
......@@ -87,6 +88,7 @@ typedef Enumeration8 wr_role_Enumeration8;
typedef pp_pdstate_t pp_pdstate;
typedef pp_exstate_t exstate;
typedef unsigned long pp_servo_flag;
typedef int pp_servo_state;
/*
* This is generated with the target compiler, and then linked
......
......@@ -133,6 +133,7 @@ void dump_one_field(void *addr, struct dump_info *info, char *info_prefix)
case dump_type_pp_pdstate:
case dump_type_exstate:
case dump_type_pp_servo_flag:
case dump_type_pp_servo_state:
if (size == 1)
i = *(uint8_t *)p;
else if (size == 2)
......@@ -430,6 +431,22 @@ void dump_one_field(void *addr, struct dump_info *info, char *info_prefix)
print_str(char_p);
printf("\n");
break;
case dump_type_pp_servo_state:
switch(i) {
ENUM_TO_P_IN_CASE(WRH_UNINITIALIZED, char_p);
ENUM_TO_P_IN_CASE(WRH_SYNC_TAI, char_p);
ENUM_TO_P_IN_CASE(WRH_SYNC_NSEC, char_p);
ENUM_TO_P_IN_CASE(WRH_SYNC_PHASE, char_p);
ENUM_TO_P_IN_CASE(WRH_TRACK_PHASE, char_p);
ENUM_TO_P_IN_CASE(WRH_WAIT_OFFSET_STABLE, 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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment