drivers: gpio: rv32m1: configure pin mux as GPIO
Set the PCR[MUX] field to kPORT_MuxAsGpio as part of configuring a GPIO pin. This removes the need to explicitly call pinmux_pin_set() in board code. Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit is contained in:
parent
a1181dbd16
commit
9ba953d13a
1 changed files with 4 additions and 0 deletions
|
@ -126,6 +126,10 @@ static int gpio_rv32m1_configure(const struct device *dev,
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set PCR mux to GPIO for the pin we are configuring */
|
||||||
|
mask |= PORT_PCR_MUX_MASK;
|
||||||
|
pcr |= PORT_PCR_MUX(kPORT_MuxAsGpio);
|
||||||
|
|
||||||
/* Now do the PORT module. Figure out the pullup/pulldown
|
/* Now do the PORT module. Figure out the pullup/pulldown
|
||||||
* configuration, but don't write it to the PCR register yet.
|
* configuration, but don't write it to the PCR register yet.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue