Other Parts Discussed in Thread: CC3100SDK, CC3100BOOST, CC3100
Tool/software: Code Composer Studio
Hi. I am having trouble understanding best practice for using the code provided by CCS when importing a project from the cc3100sdk. I would like to set up an interrupt to handle a button press (on P1.4) and see that board.c has existing code that I believe I should be adding to or modifying (for instance the PORT1_ISR and registerButtonIrqHandler). Unfortunately, I cannot find any documentation on how to properly add to this code. board.c/h have existing code for s1 (a switch on the msp430f5529lp that is covered by the cc3100boost, so I cannot use that existing code but would like to either copy or modify it).
I have tried to add a function in board.c that I could point the BUTTON_PRESS_HANDLER to and a flag that could be set in this function which I can reference from within my main function. This created symbol redefined errors in obj files that were created when compiling. For instance error symbol "btnP1_4Flag" first defined in "./main.obj"; redefined in "./board/board.obj"  Should I be writing this code in user.h and my main.c files while leaving board.c/h untouched? Thanks for pointing me in the right direction to solve this problem.
I am using CCS7, compiler msp430_4.3.1, cc3100sdk_1.2.0 with a msp430f5529lp and cc3100BOOST.
I have selected the code that I am referring to from board.c below...
BUTTON_PRESS_HANDLER            buttonIrqHandler = 0;
static void enable_button_s1_irq()
{
    PADIR &= ~0x1080;
    P2OUT |= BIT1;
    P2DIR &= ~(BIT1);
    P2REN |= BIT1;
    P2IES &= ~(BIT1);
    P2IFG = 0;
    P2IE |= BIT1;
}
void enableButtonIrq(void)
{
    enable_button_s1_irq();
}
int registerButtonIrqHandler(BUTTON_PRESS_HANDLER InterruptHdl , void* pValue)
{
    buttonIrqHandler = InterruptHdl;
    /* Enable Switch interrupt*/
    enableButtonIrq();
    return 0;
}
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=PORT1_VECTOR
__interrupt
#elif defined(__GNUC__)
__attribute__((interrupt(PORT1_VECTOR)))
#endif
void Port1_ISR(void)
{
    /* Context save interrupt flag before calling interrupt vector. */
    /* Reading interrupt vector generator will automatically clear IFG flag */
    switch (__even_in_range(P1IV, P1IV_P1IFG7))
    {
        /* Vector  P1IV_NONE:  No Interrupt pending */
        case  P1IV_NONE:
            break;
        /* Vector  P1IV_P1IFG0:  P1IV P1IFG.0 */
        case  P1IV_P1IFG0:
            break;
...
        case  P1IV_P1IFG7:
            break;
        /* Default case */
        default:
            break;
    }
}
								 
				 
		 
					 
                           
				