application: minor, slight swd code improvement

This commit is contained in:
King Kévin 2021-03-16 12:18:20 +01:00
parent 7cfad7dd68
commit d83f26e126
1 changed files with 2 additions and 7 deletions

View File

@ -251,11 +251,6 @@ static void command_swd_scan(void* argument)
printf("searching SWD on channels (%u combinations): ", (channel_stop - channel_start + 1) * (channel_stop - channel_start));
mux_select(-1); // disable multiplexer
gpio_set(GPIO_PORT(SIGNAL_PU_PIN), GPIO_PIN(SIGNAL_PU_PIN)); // ensure we are not pulling up the signal
gpio_set(GPIO_PORT(SIGNAL_PD_PIN), GPIO_PIN(SIGNAL_PD_PIN)); // ensure we are not pulling down the signal
gpio_clear(GPIO_PORT(TARGET_EN), GPIO_PIN(TARGET_EN)); // power level shifter
uint8_t found = 0;
for (uint8_t swclk = channel_start; swclk <= channel_stop; swclk++) {
for (uint8_t swdio = channel_start; swdio <= channel_stop; swdio++) {
@ -686,8 +681,8 @@ static const struct menu_command_t menu_commands[] = {
},
{
.shortcut = 's',
.name = "scan",
.command_description = "scan SWD device",
.name = "swd",
.command_description = "scan for SWD interfaces",
.argument = MENU_ARGUMENT_NONE,
.argument_description = NULL,
.command_handler = &command_swd_scan,