Im very late to the party, but OP, this is what you want I suppose?
#ifndef _GPIOMacros_
#define _GPIOMacros_
#include <msp430.h>
//Digital I/O registers
// P1IV - Port 1 Interrupt Vector
// P1IES - Port 1 Interrupt Edge Select
#define PORT1_INTERRUPT_PIN_ON_POS_EDGE(pin) P1IES &= ~BIT ## pin
#define PORT1_INTERRUPT_PIN_ON_NEG_EDGE(pin) P1IES |= BIT ## pin
// P1IE - Port 1 Interrupt Enable
#define ENABLE_PORT1_INTERRUPTS_PIN(pin) P1IE |= BIT ## pin
#define DISABLE_PORT1_INTERRUPTS_PIN(pin) P1IE &= ~BIT ## pin
// P1IFG - Port 1 Interrupt Flag
#define CLEAR_PORT1_FLAG_PIN(pin) P1IFG &= ~BIT ## pin
#define SET_PORT1_FLAG_PIN(pin) P1IFG |= BIT ## pin
// P2IES - Port 2 Interrupt Edge Select
#define PORT2_INTERRUPT_PIN_ON_POS_EDGE(pin) P2IES &= ~BIT ## pin
#define PORT2_INTERRUPT_PIN_ON_NEG_EDGE(pin) P2IES |= BIT ## pin
// P2IE - Port 2 Interrupt Enable
#define ENABLE_PORT2_INTERRUPTS_PIN(pin) P2IE |= BIT ## pin
#define DISABLE_PORT2_INTERRUPTS_PIN(pin) P2IE &= ~BIT ## pin
// P2IFG - Port 2 Interrupt Flag
#define CLEAR_PORT2_FLAG_PIN(pin) P2IFG &= ~BIT ## pin
#define SET_PORT2_FLAG_PIN(pin) P2IFG |= BIT ## pin
// PxIN - Port x Input
#define READ_GPIO_INPUT(port,pin) P ## port ## IN & BIT ## pin // Note to Self: Assume P1IN = 8'b10000000 then P1IN & BIT7 = 128
// PxOUT - Port x Output
#define GPIO_OUT(port) P ## port ## OUT
// PxDIR - Port x Direction
#define GPIO_DIR(port) P ## port ## DIR
// PxREN - Port x Resistor
#define GPIO_REN(port) P ## port ## REN
// PxDS - Port x Drive Strength
#define GPIO_DS(port) P ## port ## DS
// PxSEL - Port x Peripheral Selection
#define GPIO_SEL(port) P ## port ## SEL
// Pin Selections - (Input OR Output) & (Peripheral OR NO_Peripheral)
#define SET_GPIO_AS_OUTPUT(port,pin) GPIO_SEL(port) &= ~BIT ## pin; \
GPIO_DIR(port) |= BIT ## pin; \
GPIO_OUT(port) &= ~BIT ## pin;
#define SET_GPIO_AS_INPUT(port,pin) GPIO_SEL(port) &= ~BIT ## pin; \
GPIO_DIR(port) &= ~BIT ## pin;
#define USE_GPIO_PERIPHERAL_AS_OUTPUT(port,pin) GPIO_SEL(port) |= BIT ## pin; \
GPIO_DIR(port) |= BIT ## pin;
#define USE_GPIO_PERIPHERAL_AS_INPUT(port,pin) GPIO_SEL(port) |= BIT ## pin; \
GPIO_DIR(port) &= ~BIT ## pin;
#define ENABLE_PIN_RESISTOR(port,pin) GPIO_REN(port) |= BIT ## pin;
#define DISABLE_PIN_RESISTOR(port,pin) GPIO_REN(port) &= ~BIT ## pin;
#define SET_GPIO_OUTPUT_HIGH(port,pin) GPIO_OUT(port) |= BIT ## pin;
#define SET_GPIO_OUTPUT_LOW(port,pin) GPIO_OUT(port) &= ~BIT ## pin;
#define TOGGLE_GPIO_OUTPUT(port,pin) GPIO_OUT(port) ^= BIT ## pin;
// Resistor Selection - Pullup OR Pulldown
// Note to Self: Pull Up means Active Low (MCU receives a 1 until button is pressed), Pull Down Means Active High (MCU receives a 0 untill button is pressed)
#define SET_GPIO_RESISTOR_AS_PULLUP(port,pin) SET_GPIO_AS_INPUT(port,pin); \
ENABLE_PIN_RESISTOR(port,pin); \
SET_GPIO_OUTPUT_HIGH(port,pin);
#define SET_GPIO_RESISTOR_AS_PULLDOWN(port,pin) SET_GPIO_AS_INPUT(port,pin); \
ENABLE_PIN_RESISTOR(port,pin); \
SET_GPIO_OUTPUT_LOW(port,pin);
#endif // _GPIOMacros_
which I then use to build this?
#ifndef _DevelopmentBoardMacros_
#define _DevelopmentBoardMacros_
#include <msp430.h>
#include "GPIOMacros.h"
// Development Board Specific Macros
// BUTTONS - Switch1 is pin 2.1 and Switch2 is pin 1.1
// Note to Self: Button Interrupts appear to not work when using Active High (pull down configuration), use only Active Low (pull up)
#define CONFIGURE_INTERRUPT_SWITCH1_ON_PRESS SET_GPIO_RESISTOR_AS_PULLUP(2,1); \
PORT2_INTERRUPT_PIN_ON_NEG_EDGE(1); \
ENABLE_PORT2_INTERRUPTS_PIN(1); \
CLEAR_PORT2_FLAG_PIN(1);
#define CONFIGURE_INTERRUPT_SWITCH1_ON_RELEASE SET_GPIO_RESISTOR_AS_PULLUP(2,1); \
PORT2_INTERRUPT_PIN_ON_POS_EDGE(1); \
ENABLE_PORT2_INTERRUPTS_PIN(1); \
CLEAR_PORT2_FLAG_PIN(1);
#define CONFIGURE_INTERRUPT_SWITCH2_ON_PRESS SET_GPIO_RESISTOR_AS_PULLUP(1,1); \
PORT1_INTERRUPT_PIN_ON_NEG_EDGE(1); \
ENABLE_PORT1_INTERRUPTS_PIN(1);\
CLEAR_PORT1_FLAG_PIN(1);
#define CONFIGURE_INTERRUPT_SWITCH2_ON_RELEASE SET_GPIO_RESISTOR_AS_PULLUP(1,1); \
PORT1_INTERRUPT_PIN_ON_POS_EDGE(1); \
ENABLE_PORT1_INTERRUPTS_PIN(1); \
CLEAR_PORT1_FLAG_PIN(1);
// LEDS - left LED1 (red) pin 1.0 and right LED2 (green) is pin 4.7
#define CONFIGURE_LED1 SET_GPIO_AS_OUTPUT(1,0); \
SET_GPIO_OUTPUT_LOW(1,0);
#define CONFIGURE_LED2 SET_GPIO_AS_OUTPUT(4,7); \
SET_GPIO_OUTPUT_LOW(4,7);
#define TURN_LED1_ON SET_GPIO_OUTPUT_HIGH(1,0);
#define TURN_LED1_OFF SET_GPIO_OUTPUT_LOW(1,0);
#define TOGGLE_LED1 TOGGLE_GPIO_OUTPUT(1,0);
#define TURN_LED2_ON SET_GPIO_OUTPUT_HIGH(4,7);
#define TURN_LED2_OFF SET_GPIO_OUTPUT_LOW(4,7);
#define TOGGLE_LED2 TOGGLE_GPIO_OUTPUT(4,7);
// GPIO - SET AS INPUTS
// Left Set of Pins
// Left Column
#define SET_PORT6_PIN5_GPIO_INPUT SET_GPIO_AS_INPUT(6,5);
#define SET_PORT3_PIN4_GPIO_INPUT SET_GPIO_AS_INPUT(3,4);
#define SET_PORT3_PIN3_GPIO_INPUT SET_GPIO_AS_INPUT(3,3);
#define SET_PORT1_PIN6_GPIO_INPUT SET_GPIO_AS_INPUT(1,6);
#define SET_PORT6_PIN6_GPIO_INPUT SET_GPIO_AS_INPUT(6,6);
#define SET_PORT3_PIN2_GPIO_INPUT SET_GPIO_AS_INPUT(3,2);
#define SET_PORT2_PIN7_GPIO_INPUT SET_GPIO_AS_INPUT(2,7);
#define SET_PORT4_PIN2_GPIO_INPUT SET_GPIO_AS_INPUT(4,2);
#define SET_PORT4_PIN1_GPIO_INPUT SET_GPIO_AS_INPUT(4,1);
// Right Column
#define SET_PORT6_PIN0_GPIO_INPUT SET_GPIO_AS_INPUT(6,0);
#define SET_PORT6_PIN1_GPIO_INPUT SET_GPIO_AS_INPUT(6,1);
#define SET_PORT6_PIN2_GPIO_INPUT SET_GPIO_AS_INPUT(6,2);
#define SET_PORT6_PIN3_GPIO_INPUT SET_GPIO_AS_INPUT(6,3);
#define SET_PORT6_PIN4_GPIO_INPUT SET_GPIO_AS_INPUT(6,4);
#define SET_PORT7_PIN0_GPIO_INPUT SET_GPIO_AS_INPUT(7,0);
#define SET_PORT3_PIN6_GPIO_INPUT SET_GPIO_AS_INPUT(3,6);
#define SET_PORT3_PIN5_GPIO_INPUT SET_GPIO_AS_INPUT(3,5);
// Right Set of Pins
// Left Column
#define SET_PORT2_PIN5_GPIO_INPUT SET_GPIO_AS_INPUT(2,5);
#define SET_PORT2_PIN4_GPIO_INPUT SET_GPIO_AS_INPUT(2,4);
#define SET_PORT1_PIN5_GPIO_INPUT SET_GPIO_AS_INPUT(1,5);
#define SET_PORT1_PIN4_GPIO_INPUT SET_GPIO_AS_INPUT(1,4);
#define SET_PORT1_PIN3_GPIO_INPUT SET_GPIO_AS_INPUT(1,3);
#define SET_PORT1_PIN2_GPIO_INPUT SET_GPIO_AS_INPUT(1,2);
#define SET_PORT4_PIN3_GPIO_INPUT SET_GPIO_AS_INPUT(4,3);
#define SET_PORT4_PIN0_GPIO_INPUT SET_GPIO_AS_INPUT(4,0);
#define SET_PORT3_PIN7_GPIO_INPUT SET_GPIO_AS_INPUT(3,7);
#define SET_PORT8_PIN2_GPIO_INPUT SET_GPIO_AS_INPUT(8,2);
// Right Column
#define SET_PORT2_PIN0_GPIO_INPUT SET_GPIO_AS_INPUT(2,0);
#define SET_PORT2_PIN2_GPIO_INPUT SET_GPIO_AS_INPUT(2,2);
#define SET_PORT7_PIN4_GPIO_INPUT SET_GPIO_AS_INPUT(7,4);
//RST PIN?
#define SET_PORT3_PIN0_GPIO_INPUT SET_GPIO_AS_INPUT(3,0);
#define SET_PORT3_PIN1_GPIO_INPUT SET_GPIO_AS_INPUT(3,1);
#define SET_PORT2_PIN6_GPIO_INPUT SET_GPIO_AS_INPUT(2,6);
#define SET_PORT2_PIN3_GPIO_INPUT SET_GPIO_AS_INPUT(2,3);
#define SET_PORT8_PIN1_GPIO_INPUT SET_GPIO_AS_INPUT(8,1);
// GPIO - SET AS OUTPUTS
// Left Set of Pins
// Left Column
#define SET_PORT6_PIN5_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(6,5);
#define SET_PORT3_PIN4_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(3,4);
#define SET_PORT3_PIN3_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(3,3);
#define SET_PORT1_PIN6_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(1,6);
#define SET_PORT6_PIN6_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(6,6);
#define SET_PORT3_PIN2_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(3,2);
#define SET_PORT2_PIN7_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(2,7);
#define SET_PORT4_PIN2_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(4,2);
#define SET_PORT4_PIN1_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(4,1);
// Right Column
#define SET_PORT6_PIN0_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(6,0);
#define SET_PORT6_PIN1_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(6,1);
#define SET_PORT6_PIN2_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(6,2);
#define SET_PORT6_PIN3_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(6,3);
#define SET_PORT6_PIN4_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(6,4);
#define SET_PORT7_PIN0_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(7,0);
#define SET_PORT3_PIN6_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(3,6);
#define SET_PORT3_PIN5_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(3,5);
// Right Set of Pins
// Left Column
#define SET_PORT2_PIN5_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(2,5);
#define SET_PORT2_PIN4_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(2,4);
#define SET_PORT1_PIN5_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(1,5);
#define SET_PORT1_PIN4_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(1,4);
#define SET_PORT1_PIN3_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(1,3);
#define SET_PORT1_PIN2_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(1,2);
#define SET_PORT4_PIN3_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(4,3);
#define SET_PORT4_PIN0_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(4,0);
#define SET_PORT3_PIN7_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(3,7);
#define SET_PORT8_PIN2_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(8,2);
// Right Column
#define SET_PORT2_PIN0_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(2,0);
#define SET_PORT2_PIN2_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(2,2);
#define SET_PORT7_PIN4_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(7,4);
//RST PIN?
#define SET_PORT3_PIN0_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(3,0);
#define SET_PORT3_PIN1_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(3,1);
#define SET_PORT2_PIN6_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(2,6);
#define SET_PORT2_PIN3_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(2,3);
#define SET_PORT8_PIN1_GPIO_OUTPUT SET_GPIO_AS_OUTPUT(8,1);
// GPIO - Enable Interrupts
// Left Set of Pins
// Left Column
#define ENABLE_GPIO_INTERRUPTS_PORT1_PIN6 ENABLE_PORT1_INTERRUPTS_PIN(6); \
CLEAR_PORT1_FLAG_PIN(6);
#define ENABLE_GPIO_INTERRUPTS_PORT2_PIN7 ENABLE_PORT2_INTERRUPTS_PIN(7); \
CLEAR_PORT2_FLAG_PIN(7);
// Right Column
// Right Set of Pins
// Left Column
#define ENABLE_GPIO_INTERRUPTS_PORT2_PIN5 ENABLE_PORT2_INTERRUPTS_PIN(5); \
CLEAR_PORT2_FLAG_PIN(5);
#define ENABLE_GPIO_INTERRUPTS_PORT2_PIN4 ENABLE_PORT2_INTERRUPTS_PIN(4); \
CLEAR_PORT2_FLAG_PIN(4);
#define ENABLE_GPIO_INTERRUPTS_PORT1_PIN5 ENABLE_PORT1_INTERRUPTS_PIN(5); \
CLEAR_PORT1_FLAG_PIN(5);
#define ENABLE_GPIO_INTERRUPTS_PORT1_PIN4 ENABLE_PORT1_INTERRUPTS_PIN(4); \
CLEAR_PORT1_FLAG_PIN(4);
#define ENABLE_GPIO_INTERRUPTS_PORT1_PIN3 ENABLE_PORT1_INTERRUPTS_PIN(3); \
CLEAR_PORT1_FLAG_PIN(3);
#define ENABLE_GPIO_INTERRUPTS_PORT1_PIN2 ENABLE_PORT1_INTERRUPTS_PIN(2); \
CLEAR_PORT1_FLAG_PIN(2);
// Right Column
#define ENABLE_GPIO_INTERRUPTS_PORT2_PIN0 ENABLE_PORT2_INTERRUPTS_PIN(0); \
CLEAR_PORT2_FLAG_PIN(0);
#define ENABLE_GPIO_INTERRUPTS_PORT2_PIN2 ENABLE_PORT2_INTERRUPTS_PIN(2); \
CLEAR_PORT2_FLAG_PIN(2);
#define ENABLE_GPIO_INTERRUPTS_PORT2_PIN6 ENABLE_PORT2_INTERRUPTS_PIN(6); \
CLEAR_PORT2_FLAG_PIN(6);
#define ENABLE_GPIO_INTERRUPTS_PORT2_PIN3 ENABLE_PORT2_INTERRUPTS_PIN(3); \
CLEAR_PORT2_FLAG_PIN(3);
// GPIO - Disable Interrupts
// Left Set of Pins
// Left Column
#define DISABLE_GPIO_INTERRUPTS_PORT1_PIN6 DISABLE_PORT1_INTERRUPTS_PIN(6); \
CLEAR_PORT1_FLAG_PIN(6);
#define DISABLE_GPIO_INTERRUPTS_PORT2_PIN7 DISABLE_PORT2_INTERRUPTS_PIN(7); \
CLEAR_PORT2_FLAG_PIN(7);
// Right Column
// Right Set of Pins
// Left Column
#define DISABLE_GPIO_INTERRUPTS_PORT2_PIN5 DISABLE_PORT2_INTERRUPTS_PIN(5); \
CLEAR_PORT2_FLAG_PIN(5);
#define DISABLE_GPIO_INTERRUPTS_PORT2_PIN4 DISABLE_PORT2_INTERRUPTS_PIN(4); \
CLEAR_PORT2_FLAG_PIN(4);
#define DISABLE_GPIO_INTERRUPTS_PORT1_PIN5 DISABLE_PORT1_INTERRUPTS_PIN(5); \
CLEAR_PORT1_FLAG_PIN(5);
#define DISABLE_GPIO_INTERRUPTS_PORT1_PIN4 DISABLE_PORT1_INTERRUPTS_PIN(4); \
CLEAR_PORT1_FLAG_PIN(4);
#define DISABLE_GPIO_INTERRUPTS_PORT1_PIN3 DISABLE_PORT1_INTERRUPTS_PIN(3); \
CLEAR_PORT1_FLAG_PIN(3);
#define DISABLE_GPIO_INTERRUPTS_PORT1_PIN2 DISABLE_PORT1_INTERRUPTS_PIN(2); \
CLEAR_PORT1_FLAG_PIN(2);
// Right Column
#define DISABLE_GPIO_INTERRUPTS_PORT2_PIN0 DISABLE_PORT2_INTERRUPTS_PIN(0); \
CLEAR_PORT2_FLAG_PIN(0);
#define DISABLE_GPIO_INTERRUPTS_PORT2_PIN2 DISABLE_PORT2_INTERRUPTS_PIN(2); \
CLEAR_PORT2_FLAG_PIN(2);
#define DISABLE_GPIO_INTERRUPTS_PORT2_PIN6 DISABLE_PORT2_INTERRUPTS_PIN(6); \
CLEAR_PORT2_FLAG_PIN(6);
#define DISABLE_GPIO_INTERRUPTS_PORT2_PIN3 DISABLE_PORT2_INTERRUPTS_PIN(3); \
CLEAR_PORT2_FLAG_PIN(3);
// GPIO - Interrupt On Positive Edge
// Left Set of Pins
// Left Column
#define INTERRUPT_PORT1_PIN6_GPIO_ON_POS_EDGE PORT1_INTERRUPT_PIN_ON_POS_EDGE(6);
#define INTERRUPT_PORT2_PIN7_GPIO_ON_POS_EDGE PORT2_INTERRUPT_PIN_ON_POS_EDGE(7);
// Right Column
// Right Set of Pins
// Left Column
#define INTERRUPT_PORT2_PIN5_GPIO_ON_POS_EDGE PORT2_INTERRUPT_PIN_ON_POS_EDGE(5);
#define INTERRUPT_PORT2_PIN4_GPIO_ON_POS_EDGE PORT2_INTERRUPT_PIN_ON_POS_EDGE(4);
#define INTERRUPT_PORT1_PIN5_GPIO_ON_POS_EDGE PORT1_INTERRUPT_PIN_ON_POS_EDGE(5);
#define INTERRUPT_PORT1_PIN4_GPIO_ON_POS_EDGE PORT1_INTERRUPT_PIN_ON_POS_EDGE(4);
#define INTERRUPT_PORT1_PIN3_GPIO_ON_POS_EDGE PORT1_INTERRUPT_PIN_ON_POS_EDGE(3);
#define INTERRUPT_PORT1_PIN2_GPIO_ON_POS_EDGE PORT1_INTERRUPT_PIN_ON_POS_EDGE(2);
// Right Column
#define INTERRUPT_PORT2_PIN0_GPIO_ON_POS_EDGE PORT2_INTERRUPT_PIN_ON_POS_EDGE(0);
#define INTERRUPT_PORT2_PIN2_GPIO_ON_POS_EDGE PORT2_INTERRUPT_PIN_ON_POS_EDGE(2);
#define INTERRUPT_PORT2_PIN6_GPIO_ON_POS_EDGE PORT2_INTERRUPT_PIN_ON_POS_EDGE(6);
#define INTERRUPT_PORT2_PIN3_GPIO_ON_POS_EDGE PORT2_INTERRUPT_PIN_ON_POS_EDGE(3);
// GPIO - Interrupt On Negative Edge
// Left Set of Pins
// Left Column
#define INTERRUPT_PORT1_PIN6_GPIO_ON_NEG_EDGE PORT1_INTERRUPT_PIN_ON_NEG_EDGE(6);
#define INTERRUPT_PORT2_PIN7_GPIO_ON_NEG_EDGE PORT2_INTERRUPT_PIN_ON_NEG_EDGE(7);
// Right Column
// Right Set of Pins
// Left Column
#define INTERRUPT_PORT2_PIN5_GPIO_ON_NEG_EDGE PORT2_INTERRUPT_PIN_ON_NEG_EDGE(5);
#define INTERRUPT_PORT2_PIN4_GPIO_ON_NEG_EDGE PORT2_INTERRUPT_PIN_ON_NEG_EDGE(4);
#define INTERRUPT_PORT1_PIN5_GPIO_ON_NEG_EDGE PORT1_INTERRUPT_PIN_ON_NEG_EDGE(5);
#define INTERRUPT_PORT1_PIN4_GPIO_ON_NEG_EDGE PORT1_INTERRUPT_PIN_ON_NEG_EDGE(4);
#define INTERRUPT_PORT1_PIN3_GPIO_ON_NEG_EDGE PORT1_INTERRUPT_PIN_ON_NEG_EDGE(3);
#define INTERRUPT_PORT1_PIN2_GPIO_ON_NEG_EDGE PORT1_INTERRUPT_PIN_ON_NEG_EDGE(2);
// Right Column
#define INTERRUPT_PORT2_PIN0_GPIO_ON_NEG_EDGE PORT2_INTERRUPT_PIN_ON_NEG_EDGE(0);
#define INTERRUPT_PORT2_PIN2_GPIO_ON_NEG_EDGE PORT2_INTERRUPT_PIN_ON_NEG_EDGE(2);
#define INTERRUPT_PORT2_PIN6_GPIO_ON_NEG_EDGE PORT2_INTERRUPT_PIN_ON_NEG_EDGE(6);
#define INTERRUPT_PORT2_PIN3_GPIO_ON_NEG_EDGE PORT2_INTERRUPT_PIN_ON_NEG_EDGE(3);
// GPIO - SET OUTPUT HIGH
// Left Set of Pins
// Left Column
#define SET_PORT6_PIN5_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(6,5);
#define SET_PORT3_PIN4_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(3,4);
#define SET_PORT3_PIN3_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(3,3);
#define SET_PORT1_PIN6_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(1,6);
#define SET_PORT6_PIN6_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(6,6);
#define SET_PORT3_PIN2_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(3,2);
#define SET_PORT2_PIN7_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(2,7);
#define SET_PORT4_PIN2_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(4,2);
#define SET_PORT4_PIN1_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(4,1);
// Right Column
#define SET_PORT6_PIN0_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(6,0);
#define SET_PORT6_PIN1_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(6,1);
#define SET_PORT6_PIN2_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(6,2);
#define SET_PORT6_PIN3_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(6,3);
#define SET_PORT6_PIN4_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(6,4);
#define SET_PORT7_PIN0_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(7,0);
#define SET_PORT3_PIN6_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(3,6);
#define SET_PORT3_PIN5_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(3,5);
// Right Set of Pins
// Left Column
#define SET_PORT2_PIN5_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(2,5);
#define SET_PORT2_PIN4_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(2,4);
#define SET_PORT1_PIN5_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(1,5);
#define SET_PORT1_PIN4_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(1,4);
#define SET_PORT1_PIN3_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(1,3);
#define SET_PORT1_PIN2_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(1,2);
#define SET_PORT4_PIN3_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(4,3);
#define SET_PORT4_PIN0_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(4,0);
#define SET_PORT3_PIN7_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(3,7);
#define SET_PORT8_PIN2_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(8,2);
// Right Column
#define SET_PORT2_PIN0_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(2,0);
#define SET_PORT2_PIN2_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(2,2);
#define SET_PORT7_PIN4_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(7,4);
//RST PIN?
#define SET_PORT3_PIN0_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(3,0);
#define SET_PORT3_PIN1_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(3,1);
#define SET_PORT2_PIN6_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(2,6);
#define SET_PORT2_PIN3_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(2,3);
#define SET_PORT8_PIN1_GPIO_OUTPUT_HIGH SET_GPIO_OUTPUT_HIGH(8,1);
// GPIO - SET OUTPUT LOW
// Left Set of Pins
// Left Column
#define SET_PORT6_PIN5_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(6,5);
#define SET_PORT3_PIN4_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(3,4);
#define SET_PORT3_PIN3_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(3,3);
#define SET_PORT1_PIN6_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(1,6);
#define SET_PORT6_PIN6_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(6,6);
#define SET_PORT3_PIN2_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(3,2);
#define SET_PORT2_PIN7_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(2,7);
#define SET_PORT4_PIN2_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(4,2);
#define SET_PORT4_PIN1_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(4,1);
// Right Column
#define SET_PORT6_PIN0_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(6,0);
#define SET_PORT6_PIN1_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(6,1);
#define SET_PORT6_PIN2_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(6,2);
#define SET_PORT6_PIN3_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(6,3);
#define SET_PORT6_PIN4_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(6,4);
#define SET_PORT7_PIN0_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(7,0);
#define SET_PORT3_PIN6_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(3,6);
#define SET_PORT3_PIN5_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(3,5);
// Right Set of Pins
// Left Column
#define SET_PORT2_PIN5_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(2,5);
#define SET_PORT2_PIN4_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(2,4);
#define SET_PORT1_PIN5_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(1,5);
#define SET_PORT1_PIN4_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(1,4);
#define SET_PORT1_PIN3_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(1,3);
#define SET_PORT1_PIN2_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(1,2);
#define SET_PORT4_PIN3_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(4,3);
#define SET_PORT4_PIN0_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(4,0);
#define SET_PORT3_PIN7_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(3,7);
#define SET_PORT8_PIN2_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(8,2);
// Right Column
#define SET_PORT2_PIN0_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(2,0);
#define SET_PORT2_PIN2_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(2,2);
#define SET_PORT7_PIN4_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(7,4);
//RST PIN?
#define SET_PORT3_PIN0_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(3,0);
#define SET_PORT3_PIN1_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(3,1);
#define SET_PORT2_PIN6_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(2,6);
#define SET_PORT2_PIN3_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(2,3);
#define SET_PORT8_PIN1_GPIO_OUTPUT_LOW SET_GPIO_OUTPUT_LOW(8,1);
// GPIO - TOGGLE OUTPUT
// Left Set of Pins
// Left Column
#define TOGGLE_PORT6_PIN5_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(6,5);
#define TOGGLE_PORT3_PIN4_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(3,4);
#define TOGGLE_PORT3_PIN3_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(3,3);
#define TOGGLE_PORT1_PIN6_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(1,6);
#define TOGGLE_PORT6_PIN6_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(6,6);
#define TOGGLE_PORT3_PIN2_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(3,2);
#define TOGGLE_PORT2_PIN7_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(2,7);
#define TOGGLE_PORT4_PIN2_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(4,2);
#define TOGGLE_PORT4_PIN1_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(4,1);
// Right Column
#define TOGGLE_PORT6_PIN0_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(6,0);
#define TOGGLE_PORT6_PIN1_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(6,1);
#define TOGGLE_PORT6_PIN2_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(6,2);
#define TOGGLE_PORT6_PIN3_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(6,3);
#define TOGGLE_PORT6_PIN4_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(6,4);
#define TOGGLE_PORT7_PIN0_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(7,0);
#define TOGGLE_PORT3_PIN6_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(3,6);
#define TOGGLE_PORT3_PIN5_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(3,5);
// Right Set of Pins
// Left Column
#define TOGGLE_PORT2_PIN5_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(2,5);
#define TOGGLE_PORT2_PIN4_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(2,4);
#define TOGGLE_PORT1_PIN5_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(1,5);
#define TOGGLE_PORT1_PIN4_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(1,4);
#define TOGGLE_PORT1_PIN3_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(1,3);
#define TOGGLE_PORT1_PIN2_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(1,2);
#define TOGGLE_PORT4_PIN3_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(4,3);
#define TOGGLE_PORT4_PIN0_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(4,0);
#define TOGGLE_PORT3_PIN7_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(3,7);
#define TOGGLE_PORT8_PIN2_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(8,2);
// Right Column
#define TOGGLE_PORT2_PIN0_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(2,0);
#define TOGGLE_PORT2_PIN2_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(2,2);
#define TOGGLE_PORT7_PIN4_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(7,4);
//RST PIN?
#define TOGGLE_PORT3_PIN0_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(3,0);
#define TOGGLE_PORT3_PIN1_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(3,1);
#define TOGGLE_PORT2_PIN6_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(2,6);
#define TOGGLE_PORT2_PIN3_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(2,3);
#define TOGGLE_PORT8_PIN1_GPIO_OUTPUT TOGGLE_GPIO_OUTPUT(8,1);
// ADC 12
#define SET_PORT6_PIN5_ADC_A5 USE_GPIO_PERIPHERAL_AS_INPUT(6,5);
#define SET_PORT6_PIN6_ADC_A6 USE_GPIO_PERIPHERAL_AS_INPUT(6,6);
#define SET_PORT6_PIN0_ADC_A0 USE_GPIO_PERIPHERAL_AS_INPUT(6,0);
#define SET_PORT6_PIN1_ADC_A1 USE_GPIO_PERIPHERAL_AS_INPUT(6,1);
#define SET_PORT6_PIN2_ADC_A2 USE_GPIO_PERIPHERAL_AS_INPUT(6,2);
#define SET_PORT6_PIN3_ADC_A3 USE_GPIO_PERIPHERAL_AS_INPUT(6,3);
#define SET_PORT6_PIN4_ADC_A4 USE_GPIO_PERIPHERAL_AS_INPUT(6,4);
#define SET_PORT7_PIN0_ADC_A12 USE_GPIO_PERIPHERAL_AS_INPUT(7,0);
// Timers
// PWMs
#define SET_PORT3_PIN6_TIMERB0_6_PWM_OUTPUT USE_GPIO_PERIPHERAL_AS_OUTPUT(3,6);
#define SET_PORT3_PIN5_TIMERB0_5_PWM_OUTPUT USE_GPIO_PERIPHERAL_AS_OUTPUT(3,5);
#define SET_PORT2_PIN0_TIMERA1_1_PWM_OUTPUT USE_GPIO_PERIPHERAL_AS_OUTPUT(2,0);
#define SET_PORT7_PIN4_TIMERB0_2_PWM_OUTPUT USE_GPIO_PERIPHERAL_AS_OUTPUT(7,4);
#define SET_PORT2_PIN3_TIMERA2_0_PWM_OUTPUT USE_GPIO_PERIPHERAL_AS_OUTPUT(2,3);
#define SET_PORT2_PIN5_TIMERA2_2_PWM_OUTPUT USE_GPIO_PERIPHERAL_AS_OUTPUT(2,5);
#define SET_PORT2_PIN3_TIMERA2_1_PWM_OUTPUT USE_GPIO_PERIPHERAL_AS_OUTPUT(2,3);
#define SET_PORT1_PIN3_TIMERA0_2_PWM_OUTPUT USE_GPIO_PERIPHERAL_AS_OUTPUT(1,3);
#define SET_PORT1_PIN2_TIMERA0_1_PWM_OUTPUT USE_GPIO_PERIPHERAL_AS_OUTPUT(1,2);
// Timer Captures
#define SET_PORT3_PIN6_TIMERB0_6_CAPTURE_INPUT USE_GPIO_PERIPHERAL_AS_INPUT(3,6);
#define SET_PORT3_PIN5_TIMERB0_5_CAPTURE_INPUT USE_GPIO_PERIPHERAL_AS_INPUT(3,5);
#define SET_PORT2_PIN0_TIMERA1_1_CAPTURE_INPUT USE_GPIO_PERIPHERAL_AS_INPUT(2,0);
#define SET_PORT7_PIN4_TIMERB0_2_CAPTURE_INPUT USE_GPIO_PERIPHERAL_AS_INPUT(7,4);
#define SET_PORT2_PIN3_TIMERA2_0_CAPTURE_INPUT USE_GPIO_PERIPHERAL_AS_INPUT(2,3);
#define SET_PORT2_PIN5_TIMERA2_2_CAPTURE_INPUT USE_GPIO_PERIPHERAL_AS_INPUT(2,5);
#define SET_PORT2_PIN3_TIMERA2_1_CAPTURE_INPUT USE_GPIO_PERIPHERAL_AS_INPUT(2,3);
#define SET_PORT1_PIN3_TIMERA0_2_CAPTURE_INPUT USE_GPIO_PERIPHERAL_AS_INPUT(1,3);
#define SET_PORT1_PIN2_TIMERA0_1_CAPTURE_INPUT USE_GPIO_PERIPHERAL_AS_INPUT(1,2);
// Timer Clock Inputs
#define SET_PORT2_PIN2_TA2CLK_INPUT USE_GPIO_PERIPHERAL_AS_INPUT(2,2);
#define SET_PORT1_PIN6_TA1CLK_INPUT USE_GPIO_PERIPHERAL_AS_INPUT(1,6);
#endif // _DevelopmentBoardMacros_
Which I then use to build some basic timer set up macros
#ifndef _TimerMacros_
#define _TimerMacros_
#include <msp430.h>
// Timer A (Consists of Timers A0,A1,A2. So x can be 0 OR 1 OR 2)
// TAxCTL: Timer_Ax Control Register(x can be: 0 OR 1 OR 2)
// source can be: TACLK OR ACLK OR SMCLK OR INCLK
#define SET_TIMER_Ax_CLOCK_SOURCE(x,source) TA ## x ## CTL |= TASSEL__ ## source;
// divider can be: 1 OR 2 OR 3 OR 4 OR 8
#define SET_TIMER_Ax_INPUT_DIVIDER(x,divider) TA ## x ## CTL |= ID__ ## divider;
// mode can be: STOP OR UP OR CONTINUOUS OR UPDOWN
#define SET_TIMER_Ax_MODE_CONTROLER(x,mode) TA ## x ## CTL |= MC__ ## mode;
#define CLEAR_TIMER_Ax(x) TA ## x ## CTL |= TACLR;
#define ENABLE_INTERRUPTS_TIMER_Ax(x) TA ## x ## CTL |= TAIE;
#define DISABLE_INTERRUPTS_TIMER_Ax(x) TA ## x ## CTL &= ~TAIE;
#define CHECK_PENDING_INTERRUPT_TIMER_Ax(x) TA ## x ## CTL & TAIFG;
#define CLEAR_INTERRUPT_TIMER_Ax(x) TA ## x ## CTL &= ~TAIFG;
// TAxR: Timer_Ax Counter Register
#define READ_TIMER_Ax_VALUE(x) TA ## x ## R;
#define OVERWRITE_TIMER_Ax_VALUE(x,overwrite) TA ## x ## R = overwrite;
#define CLEAR_TIMER_Ax_VALUE(x) TA ## x ## R = 0;
#define ADD_TO_TIMER_Ax_VALUE(x,addend) TA ## x ## R += addend;
#define SUBTRACT_FROM_TIMER_Ax_VALUE(x,subtrahend) TA ## x ## R -= subtrahend;
#define DIVIDE_TIMER_Ax_VALUE(x,divisor) TA ## x ## R /= divisor;
#define MULTIPLY_TIMER_Ax_VALUE(x,multiplicand) TA ## x ## R *= multiplicand;
// TAxCCTLn: Timer_Ax Capture/Compare Control n Register
#define SELECT_TIMER_Ax_CCRn_CAPTURE_MODE(x,n,mode) TA ## x CCTL ## n |= CM_ ## mode;
#define SELECT_TIMER_Ax_CCRn_CC_INPUT(x,n,select) TA ## x CCTL ## n |= CCIS_ ## select;
#define SYNCHRONOUS_TIMER_Ax_CCRn_CAPTURE(x,n) TA ## x CCTL ## n |= SCS;
#define ASYNCHRONOUS_TIMER_Ax_CCRn_CAPTURE(x,n) TA ## x CCTL ## n &= ~SCS;
#define SET_TIMER_Ax_CCRn_CAPTURE_MODE(x,n) TA ## x CCTL ## n |= CAP;
#define SET_TIMER_Ax_CCRn_COMPARE_MODE(x,n) TA ## x CCTL ## n &= ~CAP;
#define SELECT_TIMER_Ax_CCRn_OUTMOD(x,n,outputmode) TA ## x CCTL ## n |= OUTMOD_ ## outputmode;
#define ENABLE_TIMER_Ax_CCRn_INTERRUPT(x,n) TA ## x CCTL ## n |= CCIE;
#define DISABLE_TIMER_Ax_CCRn_INTERRUPT(x,n) TA ## x CCTL ## n &= ~CCIE;
#define READ_TIMER_Ax_CCRn_INPUT(x,n) TA ## x CCTL ## n & CCI;
#define SET_TIMER_Ax_CCRn_OUTPUT_HIGH(x,n) TA ## x CCTL ## n |= OUT;
#define SET_TIMER_Ax_CCRn_OUTPUT_LOW(x,n) TA ## x CCTL ## n &= ~OUT;
#define CHECK_TIMER_Ax_CCRn_CAPTURE_OVERFLOW(x,n) TA ## x CCTL ## n & COV;
#define CLEAR_TIMER_Ax_CCRn_CAPTURE_OVERFLOW(x,n) TA ## x CCTL ## n &= ~COV;
#define CHECK_TIMER_Ax_CCRn_INTERRUPT_FLAG(x,n) TA ## x CCTL ## n & CCIFG;
#define CLEAR_TIMER_Ax_CCRn_CCIFG(x,n) TA ## x CCTL ## n &= ~CCIFG;
// TAxCCRn: Timer_A Capture/Compare n Register
#define READ_TIMER_Ax_CCRn_VALUE(x,n) TA ## x ## CCR ## n ## ;
#define OVER_TIMER_Ax_CCRn_VALUE(x,n,overwrite) TA ## x ## CCR ## n = overwrite;
#define CLEAR_TIMER_Ax_CCRn_VALUE(x,n) TA ## x ## CCR ## n = 0;
#define ADD_TO_TIMER_Ax_CCRn_VALUE(x,n,addend) TA ## x ## CCR ## n += addend;
#define SUBTRACT_FROM_TIMER_Ax_CCRn_VALUE(x,n,subtrahend) TA ## x ## CCR ## n -= subtrahend;
#define MULTIPLY_TIMER_Ax_CCRn_VALUE(x,n,multiplicand) TA ## x ## CCR ## n *= multiplicand;
#define DIVIDE_TIMER_Ax_CCRn_VALUE(x,n,divisor) TA ## x ## CCR ## n /= divisor;
// TAxIV: Timer_Ax Interrupt Vector Register
#define
// TAxEX0: Timer_Ax Expansion 0 Register
#endif
of course the tabs are messed up