From b7c274c1ed3a264b50c51c301aa403e5986d5bd0 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 30 Dec 2018 13:09:18 -0600 Subject: [PATCH] arch/arm/src/tiva/common/lmxx_tm4c_gpioirq.c: Fix some errors I made in reviewing last patch --- arch/arm/src/tiva/common/lmxx_tm4c_gpioirq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/src/tiva/common/lmxx_tm4c_gpioirq.c b/arch/arm/src/tiva/common/lmxx_tm4c_gpioirq.c index 997db2e71d..7a8a4aaf66 100644 --- a/arch/arm/src/tiva/common/lmxx_tm4c_gpioirq.c +++ b/arch/arm/src/tiva/common/lmxx_tm4c_gpioirq.c @@ -693,7 +693,7 @@ int tiva_gpioirqattach(pinconfig_t pinconfig, xcpt_t isr, void *arg) void tiva_gpioirqenable(pinconfig_t pinconfig) { uint8_t port = (pinconfig & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; - uint8_t pin = 1 << (pinconfig & GPIO_PIN_MASK) >> GPIO_PIN_SHIFT; + uint8_t pin = 1 << ((pinconfig & GPIO_PIN_MASK) >> GPIO_PIN_SHIFT); uintptr_t base = tiva_gpiobaseaddress(port); /* Enable the GPIO interrupt. "The GPIO IM register is the interrupt @@ -717,7 +717,7 @@ void tiva_gpioirqenable(pinconfig_t pinconfig) void tiva_gpioirqdisable(pinconfig_t pinconfig) { uint8_t port = (pinconfig & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; - uint8_t pin = 1 << (pinconfig & GPIO_PIN_MASK) >> GPIO_PIN_SHIFT; + uint8_t pin = 1 << ((pinconfig & GPIO_PIN_MASK) >> GPIO_PIN_SHIFT); uintptr_t base = tiva_gpiobaseaddress(port); /* Disable the GPIO interrupt. "The GPIO IM register is the interrupt @@ -741,7 +741,7 @@ void tiva_gpioirqdisable(pinconfig_t pinconfig) void tiva_gpioirqclear(pinconfig_t pinconfig) { uint8_t port = (pinconfig & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; - uint8_t pin = 1 << (pinconfig & GPIO_PIN_MASK) >> GPIO_PIN_SHIFT; + uint8_t pin = 1 << ((pinconfig & GPIO_PIN_MASK) >> GPIO_PIN_SHIFT); uintptr_t base = tiva_gpiobaseaddress(port); /* "The GPIOICR register is the interrupt clear register. Writing a 1 to a bit