From 5fcad7d2bf22c94b711f7c4423646a2ff5bafba8 Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Thu, 10 Mar 2016 16:26:48 +0100 Subject: [PATCH] stlink_core_id: No need to return core_id value This rework is done in order to prepare for propagating errors returned by libusb. Signed-off-by: Maxime Coquelin --- src/stlink-common.c | 6 +++--- src/stlink-common.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stlink-common.c b/src/stlink-common.c index a20f3fa..6839593 100644 --- a/src/stlink-common.c +++ b/src/stlink-common.c @@ -494,13 +494,13 @@ void stlink_exit_dfu_mode(stlink_t *sl) { sl->backend->exit_dfu_mode(sl); } -uint32_t stlink_core_id(stlink_t *sl) { +void stlink_core_id(stlink_t *sl) { DLOG("*** stlink_core_id ***\n"); sl->backend->core_id(sl); if (sl->verbose > 2) stlink_print_data(sl); DLOG("core_id = 0x%08x\n", sl->core_id); - return sl->core_id; + return; } uint32_t stlink_chip_id(stlink_t *sl) { @@ -534,7 +534,7 @@ void stlink_cpu_id(stlink_t *sl, cortex_m3_cpuid_t *cpuid) { int stlink_load_device_params(stlink_t *sl) { ILOG("Loading device parameters....\n"); const chip_params_t *params = NULL; - sl->core_id = stlink_core_id(sl); + stlink_core_id(sl); uint32_t chip_id = stlink_chip_id(sl); uint32_t flash_size; diff --git a/src/stlink-common.h b/src/stlink-common.h index b3f8676..fbbb2b4 100644 --- a/src/stlink-common.h +++ b/src/stlink-common.h @@ -630,7 +630,7 @@ extern "C" { void stlink_exit_debug_mode(stlink_t *sl); void stlink_exit_dfu_mode(stlink_t *sl); void stlink_close(stlink_t *sl); - uint32_t stlink_core_id(stlink_t *sl); + void stlink_core_id(stlink_t *sl); void stlink_reset(stlink_t *sl); void stlink_jtag_reset(stlink_t *sl, int value); void stlink_run(stlink_t *sl);