Skip to content

Commit e414465

Browse files
xfxfmithro
authored andcommitted
Adds additional debug on/off commands (#30)
1 parent abd9fce commit e414465

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

firmware/ci.c

+16-4
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ static void help_debug(void)
120120
wputs("debug commands (alias 'd')");
121121
wputs(" debug pll - dump pll configuration");
122122
#ifdef CSR_HDMI_IN0_BASE
123-
wputs(" debug input0 - debug dvisampler0");
123+
wputs(" debug input0 <on/off> - debug dvisampler0");
124124
#endif
125125
#ifdef CSR_HDMI_IN1_BASE
126-
wputs(" debug input1 - debug dvisampler1");
126+
wputs(" debug input1 <on/off> - debug dvisampler1");
127127
#endif
128128
#ifdef CSR_SDRAM_CONTROLLER_BANDWIDTH_UPDATE_ADDR
129129
wputs(" debug ddr - show DDR bandwidth");
@@ -1051,13 +1051,25 @@ void ci_service(void)
10511051
debug_pll();
10521052
#ifdef CSR_HDMI_IN0_BASE
10531053
else if(strcmp(token, "input0") == 0) {
1054-
hdmi_in0_debug = !hdmi_in0_debug;
1054+
token = get_token(&str);
1055+
if(strcmp(token, "off") == 0)
1056+
hdmi_in0_debug = 0;
1057+
else if(strcmp(token, "on") == 0)
1058+
hdmi_in0_debug = 1;
1059+
else
1060+
hdmi_in0_debug = !hdmi_in0_debug;
10551061
wprintf("HDMI Input 0 debug %s\r\n", hdmi_in0_debug ? "on" : "off");
10561062
}
10571063
#endif
10581064
#ifdef CSR_HDMI_IN1_BASE
10591065
else if(strcmp(token, "input1") == 0) {
1060-
hdmi_in1_debug = !hdmi_in1_debug;
1066+
token = get_token(&str);
1067+
if(strcmp(token, "off") == 0)
1068+
hdmi_in1_debug = 0;
1069+
else if(strcmp(token, "on") == 0)
1070+
hdmi_in1_debug = 1;
1071+
else
1072+
hdmi_in1_debug = !hdmi_in1_debug;
10611073
wprintf("HDMI Input 1 debug %s\r\n", hdmi_in1_debug ? "on" : "off");
10621074
}
10631075
#endif

0 commit comments

Comments
 (0)