command: Cleaned up in the auto_scan command routine

This commit is contained in:
dragonmux 2022-08-14 18:12:28 +01:00 committed by Piotr Esden-Tempski
parent 8d7a5cd422
commit dde75f186d
1 changed files with 2 additions and 4 deletions

View File

@ -310,10 +310,7 @@ bool cmd_auto_scan(target *t, int argc, const char **argv)
if (devs > 0) if (devs > 0)
break; break;
platform_target_clk_output_enable(false); gdb_out("SW-DP scan found no devices.\n");
platform_nrst_set_val(false);
gdb_out("SW-DP scan failed!\n");
return false;
} }
switch (e.type) { switch (e.type) {
case EXCEPTION_TIMEOUT: case EXCEPTION_TIMEOUT:
@ -323,6 +320,7 @@ bool cmd_auto_scan(target *t, int argc, const char **argv)
gdb_outf("Exception: %s\n", e.msg); gdb_outf("Exception: %s\n", e.msg);
break; break;
} }
if (devs == 0) { if (devs == 0) {
platform_target_clk_output_enable(false); platform_target_clk_output_enable(false);
platform_nrst_set_val(false); platform_nrst_set_val(false);