dp: swdp_bitbang: fix missing reset pin error
This patch fixes an issue where the reset pin is used even when it's not given. Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
This commit is contained in:
parent
4331b5fe77
commit
4f85ce6eda
1 changed files with 5 additions and 3 deletions
|
|
@ -601,10 +601,12 @@ static int sw_port_on(const struct device *dev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config->reset.port) {
|
||||||
ret = gpio_pin_configure_dt(&config->reset, GPIO_OUTPUT_ACTIVE);
|
ret = gpio_pin_configure_dt(&config->reset, GPIO_OUTPUT_ACTIVE);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue