Hi everyone,
I bought the MSP430F5529LP + CC3100 pack.
I made exemples blink,button, HttpClient and SSL working separately, and I would like to make them work together.
My Idea is to send a https post request if a button is clicked and the blink a led to validate post has occured.
To begin, I wanted to add my button/blink code to HttpClient project without SSL connexion, but it seems like I'm having errors If I try to include interruptions onto a prject using SimpleLink Library.
Here is My code to light on/off Led if button is clicked:
#include <msp430.h> #include <stdio.h> #define LED0 BIT0 #define LED7 BIT7 #define BUTTON BIT3 volatile int flagSendTrame= 0 ; int main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P1DIR |= (LED0); // Set P1.0 to output direction P4DIR |= (LED7); // P1.3 must stay at input P1OUT &= ~(LED0); // set P1.0 to 0 (LED OFF) P4OUT &= ~(LED7); P1IE |= BUTTON; // P1.3 interrupt enabled P1IES &= ~(BUTTON); P1IFG &= ~BUTTON; // P1.3 IFG cleared __enable_interrupt(); // enable all interrupts for(;;) { if (flagSendTrame == 1) { flagSendTrame = 0; } } } #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) { P1OUT ^= LED0; // P1.0 = toggle P4OUT ^= LED7; flagSendTrame = 1; P1IFG &= ~BUTTON; // P1.3 IFG cleared //P1IES ^= BUTTON; // toggle the interrupt edge }
If I copy paste this code snippet to HttpClient project, I Have some interrupt vetor errors :
Error[Pe1076]: function "Port1_ISR" already defined in another translation unit C:\TI\CC3100SDK_1.1.0\cc3100-sdk\examples\getting_started_with_wlan_station\main.c 686
the other declaration is at line 632 of "C:\TI\CC3100SDK_1.1.0\cc3100-sdk\platform\msp430f5529lp\board.c"
Do I have to implement my interrupt vector in the board.h file?
Thanks for your help :)
Have a good day.