Skip to content

Commit

Permalink
hosted/platform: rename bmp_swd_scan to bmda_... for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
perigoso authored and dragonmux committed Jul 28, 2023
1 parent bd24d48 commit d16b658
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ bool cmd_swd_scan(target_s *t, int argc, const char **argv)
volatile exception_s e;
TRY_CATCH (e, EXCEPTION_ALL) {
#if PC_HOSTED == 1
scan_result = bmp_swd_scan(targetid);
scan_result = bmda_swd_scan(targetid);
#else
scan_result = adiv5_swd_scan(targetid);
#endif
Expand Down Expand Up @@ -311,7 +311,7 @@ bool cmd_auto_scan(target_s *t, int argc, const char **argv)
gdb_out("JTAG scan found no devices, trying SWD!\n");

#if PC_HOSTED == 1
scan_result = bmp_swd_scan(0);
scan_result = bmda_swd_scan(0);
#else
scan_result = adiv5_swd_scan(0);
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/include/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ typedef uint32_t target_addr_t;
typedef struct target_controller target_controller_s;

#if PC_HOSTED == 1
bool bmp_swd_scan(uint32_t targetid);
bool bmda_swd_scan(uint32_t targetid);
bool bmda_jtag_scan(void);
#endif
bool adiv5_swd_scan(uint32_t targetid);
Expand Down
4 changes: 2 additions & 2 deletions src/platforms/hosted/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,11 @@ bool scan_for_targets(const bmda_cli_options_s *const opt)
if (opt->opt_scanmode == BMP_SCAN_JTAG)
return bmda_jtag_scan();
if (opt->opt_scanmode == BMP_SCAN_SWD)
return bmp_swd_scan(opt->opt_targetid);
return bmda_swd_scan(opt->opt_targetid);
if (bmda_jtag_scan())
return true;
DEBUG_WARN("JTAG scan found no devices, trying SWD.\n");
if (bmp_swd_scan(opt->opt_targetid))
if (bmda_swd_scan(opt->opt_targetid))
return true;
DEBUG_ERROR("SW-DP scan failed!\n");
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/hosted/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void platform_init(int argc, char **argv)
}
}

bool bmp_swd_scan(const uint32_t targetid)
bool bmda_swd_scan(const uint32_t targetid)
{
info.is_jtag = false;
platform_max_frequency_set(cl_opts.opt_max_swj_frequency);
Expand Down

0 comments on commit d16b658

Please sign in to comment.