This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem with interrupts [ error #66: expected a ";" ]



When I try to debug my code I get an error: 
"../main.c", line 25: error #66: expected a ";"
What I am doing wrong?


#include <msp430.h> #define LED (0x0001) #define SWITCH (0x0008) int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer P1DIR |= LED; P1DIR &= ~SWITCH; P1OUT &= ~LED; P1IE |= SWITCH; // enable interrupt for SWITCH P1IES |= SWITCH; // interrupt enabled to falling edge P1IFG &= ~SWITCH; // zero the interrupt flag __enable_interrupt(); while(1) { // just spend some time... } #pragma vector=PORT1_VECTOR __interrupt void my_interrupt(void) {    // LINE 25 P1OUT ^= LED; // toggle led on and off P1IFG &= ~SWITCH; // zero the interrupt flag that we can go out from this loop } return 0; }