drivers: gpio: gpio_mcux_lpc: add pinmux setting support for IOPCTL
add support for setting pinmux when using IOPCTL peripheral, as well as setting pin configuration properties. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
parent
d5b719e084
commit
dc9c886683
1 changed files with 5 additions and 1 deletions
|
@ -88,8 +88,12 @@ static int gpio_mcux_lpc_configure(const struct device *dev, gpio_pin_t pin,
|
|||
*pinconfig |= IOPCTL_PIO_INBUF_EN;
|
||||
|
||||
if ((flags & GPIO_SINGLE_ENDED) != 0) {
|
||||
return -ENOTSUP;
|
||||
*pinconfig |= IOPCTL_PIO_PSEDRAIN_EN;
|
||||
} else {
|
||||
*pinconfig &= ~IOPCTL_PIO_PSEDRAIN_EN;
|
||||
}
|
||||
/* Select GPIO mux for this pin (func 0 is always GPIO) */
|
||||
*pinconfig &= ~(IOPCTL_PIO_FSEL_MASK);
|
||||
|
||||
#else /* LPC SOCs */
|
||||
volatile uint32_t *pinconfig;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue