Skip to content
Permalink
Browse files

boards: arm: nrf52840_pca10090: swap error for assert in board.c

Use an assert to catch the situation where we can't find a port
to use for the reset line pin, since it shouldn't really happen.

The case where reset_pin_configure() is executed but no reset
line is selected can't happen due to static asserts in `integrity.c`
that enforce a reset line to be selected when the reset pin
functionality is enabled.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
  • Loading branch information...
lemrey authored and ioannisg committed Jul 10, 2019
1 parent c231988 commit 173202f392b86ce1b0060cd00a3067b32ec4aa36
Showing with 1 addition and 3 deletions.
  1. +1 −3 boards/arm/nrf52840_pca10090/board.c
@@ -258,9 +258,7 @@ static int reset_pin_configure(struct device *p0, struct device *p1)
pin = 2;
}

if (port == NULL) {
return -EINVAL;
}
__ASSERT_NO_MSG(port != NULL);

err = gpio_pin_configure(port, pin,
GPIO_DIR_IN | GPIO_INT | GPIO_PUD_PULL_DOWN |

0 comments on commit 173202f

Please sign in to comment.
You can’t perform that action at this time.