From 71b6609cce36f052773060a13997c5edbf70de95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gil=20Benk=C3=B6?= Date: Wed, 11 Apr 2018 12:24:29 +0200 Subject: [PATCH] drivers: gpio_gecko: Use emlib API for compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensures compatibility with Silicon Labs EXX32 MCU Series 1. Signed-off-by: Gil Benkö Signed-off-by: Christian Taedcke --- drivers/gpio/gpio_gecko.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/gpio/gpio_gecko.c b/drivers/gpio/gpio_gecko.c index 20ee732ac67a7b..513de73c5e10bb 100644 --- a/drivers/gpio/gpio_gecko.c +++ b/drivers/gpio/gpio_gecko.c @@ -154,21 +154,13 @@ static int gpio_gecko_write(struct device *dev, * Writing zeros to the other bits leaves the data * output unchanged for the other pins. */ -#if defined(_GPIO_P_DOUTSET_MASK) - gpio_base->DOUTSET = BIT(pin); -#else - BUS_RegBitWrite(&gpio_base->DOUT, pin, 1); -#endif + GPIO_PinOutSet(config->gpio_index, pin); } else { /* Clear the data output for the corresponding pin. * Writing zeros to the other bits leaves the data * output unchanged for the other pins. */ -#if defined(_GPIO_P_DOUTCLR_MASK) - gpio_base->DOUTCLR = BIT(pin); -#else - BUS_RegBitWrite(&gpio_base->DOUT, pin, 0); -#endif + GPIO_PinOutClear(config->gpio_index, pin); } } else { /* GPIO_ACCESS_BY_PORT */ /* Write the data output for all the pins */