altos/stm: clean up ao_exti_enable
authorKeith Packard <keithp@keithp.com>
Wed, 29 Jun 2016 19:55:30 +0000 (12:55 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 30 Jun 2016 02:17:45 +0000 (19:17 -0700)
Was computing (1 << pin) twice for no good reason.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/stm/ao_exti_stm.c

index 35958cf845632e37cb9c21781e7af057bd0bf173..925f9a222f50020cf9f82bad6ac0c34b9ba026da 100644 (file)
@@ -144,7 +144,7 @@ ao_exti_enable(struct stm_gpio *gpio, uint8_t pin) {
        uint32_t        mask = (1 << pin);
        (void) gpio;
        stm_exti.pr = mask;
-       stm_exti.imr |= (1 << pin);
+       stm_exti.imr |= mask;
 }
 
 void