Browse Source

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>
pull/81085/head
Maximilian Deubel 8 months ago committed by Mahesh Mahadevan
parent
commit
4f85ce6eda
  1. 8
      drivers/dp/swdp_bitbang.c

8
drivers/dp/swdp_bitbang.c

@ -601,9 +601,11 @@ static int sw_port_on(const struct device *dev) @@ -601,9 +601,11 @@ static int sw_port_on(const struct device *dev)
return ret;
}
ret = gpio_pin_configure_dt(&config->reset, GPIO_OUTPUT_ACTIVE);
if (ret) {
return ret;
if (config->reset.port) {
ret = gpio_pin_configure_dt(&config->reset, GPIO_OUTPUT_ACTIVE);
if (ret) {
return ret;
}
}
return 0;

Loading…
Cancel
Save