diff --git a/src/chipid.c b/src/chipid.c index 92daeb2..2c92d1e 100644 --- a/src/chipid.c +++ b/src/chipid.c @@ -389,7 +389,7 @@ static const struct stlink_chipid_params devices[] = { const struct stlink_chipid_params *stlink_chipid_get_params(uint32_t chipid) { - struct stlink_chipid_params *params = NULL; + const struct stlink_chipid_params *params = NULL; for (size_t n = 0; n < STLINK_ARRAY_SIZE(devices); n++) { if (devices[n].chip_id == chipid) { diff --git a/src/common.c b/src/common.c index e975c0a..e61bc53 100644 --- a/src/common.c +++ b/src/common.c @@ -567,7 +567,7 @@ int stlink_cpu_id(stlink_t *sl, cortex_m3_cpuid_t *cpuid) { */ int stlink_load_device_params(stlink_t *sl) { ILOG("Loading device parameters....\n"); - struct stlink_chipid_params *params = NULL; + const struct stlink_chipid_params *params = NULL; stlink_core_id(sl); uint32_t chip_id; uint32_t flash_size;