Commit 60ec35de authored by Adam Wujek's avatar Adam Wujek

tools/wrpc-dump: add dump_type_ppi_profile

Signed-off-by: 's avatarAdam Wujek <adam.wujek@creotech.pl>
parent 14c980e6
......@@ -278,7 +278,7 @@ struct dump_info dump_info[] = {
/* sub structure */
DUMP_FIELD_SIZE(char, cfg.port_name, 16),
DUMP_FIELD_SIZE(char, cfg.iface_name, 16),
DUMP_FIELD(int, cfg.profile),
DUMP_FIELD(ppi_profile, cfg.profile),
DUMP_FIELD(delay_mechanism, cfg.delayMechanism),
/* FIXME: other fields from cfg */
......
......@@ -64,6 +64,7 @@ enum dump_type {
dump_type_pp_servo_flag,
dump_type_pp_servo_state,
dump_type_wr_state,
dump_type_ppi_profile,
};
/* because of the sizeof later on, we need these typedefs */
......@@ -91,6 +92,7 @@ typedef pp_exstate_t exstate;
typedef unsigned long pp_servo_flag;
typedef int pp_servo_state;
typedef wr_state_t wr_state;
typedef int ppi_profile;
/*
* This is generated with the target compiler, and then linked
......
......@@ -135,6 +135,7 @@ void dump_one_field(void *addr, struct dump_info *info, char *info_prefix)
case dump_type_pp_servo_flag:
case dump_type_pp_servo_state:
case dump_type_wr_state:
case dump_type_ppi_profile:
if (size == 1)
i = *(uint8_t *)p;
else if (size == 2)
......@@ -469,6 +470,20 @@ void dump_one_field(void *addr, struct dump_info *info, char *info_prefix)
print_str(char_p);
printf("\n");
break;
case dump_type_ppi_profile:
switch(i) {
ENUM_TO_P_IN_CASE(PPSI_PROFILE_PTP, char_p);
ENUM_TO_P_IN_CASE(PPSI_PROFILE_WR, char_p);
ENUM_TO_P_IN_CASE(PPSI_PROFILE_HA, char_p);
ENUM_TO_P_IN_CASE(PPSI_PROFILE_CUSTOM, 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