+ if (P2IFG & BIT4) {
+ irq_events |= 1<<ev_pir1;
+ P2IFG &= ~BIT4; // Clear P2.4 IFG
+ }
+ if (P2IFG & BIT5) {
+ irq_events |= 1<<ev_pir2;
+ P2IFG &= ~BIT5; // Clear P2.5 IFG
+ }
+#if (PBTN() == P1)
+ __bic_SR_register_on_exit(LPM0_bits); // Wake up
+}
+// GPIO interrupt service routine
+#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
+#pragma vector=PORT1_VECTOR
+__interrupt void Port_1(void)
+#elif defined(__GNUC__)
+void __attribute__ ((interrupt(PORT1_VECTOR))) Port_1 (void)
+#else
+#error Compiler not supported!
+#endif
+{
+#endif /* (PBTN() == P1) */