altos: Flip button IRQ initialization around
authorKeith Packard <keithp@keithp.com>
Sun, 23 Oct 2011 22:24:02 +0000 (15:24 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 23 Oct 2011 22:24:02 +0000 (15:24 -0700)
This matches what the docs suggest

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

index 547d71accea1b18d3e275c8f02ad6a5050d00cdb..3516d55960ebcc7b6c038ff3e779550f23d1873a 100644 (file)
@@ -76,11 +76,11 @@ ao_button_init(void)
         * Set P0 interrupts to falling edge
         */
        
-       PICTL |= PICTL_P2IEN | PICTL_P0IENH | PICTL_P2ICON | PICTL_P0ICON;
-
        /* Enable interrupts for P0 inputs */
        IEN1 |= IEN1_P0IE;
 
        /* Enable interrupts for P2 inputs */
        IEN2 |= IEN2_P2IE;
+
+       PICTL |= PICTL_P2IEN | PICTL_P0IENH | PICTL_P2ICON | PICTL_P0ICON;
 }