Commit ee3e064e authored by Tristan Gingold's avatar Tristan Gingold

wr2rf: improve output of lemo-show

parent 3300c040
......@@ -2543,11 +2543,56 @@ lemo_disp_dbg(struct libwr2rf_dev *dev, struct strb *strb, unsigned lemo)
val = libwr2rf_read16
(dev, WR2RF_VME_REGS_INIT + WR2RF_INIT_REGS_TMGIO1 + lemo*2);
strb_printf(strb, "out: ");
if (val == (1 << (LIBWR2RF_LEMO_DBG_WRS_SOFTSTOP - 1)))
if (val == (1 << (LIBWR2RF_LEMO_DBG_WRS_SOFTSTOP - 1))) {
unsigned vtu;
strb_printf(strb, "softstop");
else if (val == (1 << (LIBWR2RF_LEMO_DBG_WRS_SOFTSTART - 1)))
vtu = libwr2rf_read16(dev, WR2RF_VME_REGS_INIT + WR2RF_INIT_REGS_SOFTSTART);
switch (vtu) {
case LIBWR2RF_RF1T1_SOFTSTOP_SEL:
strb_printf(strb, "(1.1)");
break;
case LIBWR2RF_RF1T2_SOFTSTOP_SEL:
strb_printf(strb, "(1.2)");
break;
case LIBWR2RF_RF2T1_SOFTSTOP_SEL:
strb_printf(strb, "(2.1)");
break;
case LIBWR2RF_RF2T2_SOFTSTOP_SEL:
strb_printf(strb, "(2.2)");
break;
default:
strb_printf(strb, "(bad)");
break;
}
}
else if (val == (1 << (LIBWR2RF_LEMO_DBG_WRS_SOFTSTART - 1))) {
unsigned vtu;
strb_printf(strb, "softstart");
else
vtu = libwr2rf_read16(dev, WR2RF_VME_REGS_INIT + WR2RF_INIT_REGS_SOFTSTART);
switch (vtu) {
case LIBWR2RF_RF1T1_SOFTSTART_SEL:
strb_printf(strb, "(1.1)");
break;
case LIBWR2RF_RF1T2_SOFTSTART_SEL:
strb_printf(strb, "(1.2)");
break;
case LIBWR2RF_RF2T1_SOFTSTART_SEL:
strb_printf(strb, "(2.1)");
break;
case LIBWR2RF_RF2T2_SOFTSTART_SEL:
strb_printf(strb, "(2.2)");
break;
default:
strb_printf(strb, "(bad)");
break;
}
} else
strb_printf(strb, "%s", xlat_get_name(dbg_reg, val, "??"));
}
......
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