Hello
Sorry to ask a simple question here, what is the syntax to check for flag status
I have taken an example from the book MSP microcontroller basics
#include <msp430g2253.h>
#define LED_0 BIT0
#define LED_1 BIT6
#define LED_OUT P1OUT
#define LED_DIR P1DIR
void main(void)
{
WDTCTL = WDTPW + WDTHOLD;
LED_DIR = LED_0 + LED_1;
LED_OUT &= ~(LED_0 + LED_1);
TACTL = TASSEL_2 + MC_2 + ID_3 + TACLR;
while(1)
{
//check for timer A TAFIG interrupt bit, if activated toggle LED
while(TACTL_bit.TAIFG == 0) //what is the syntax to check bit status
{}
TACTL_bit.TAIFG = 0 //same here
LED_OUT ^= LED_0|LED_1;
}
}
Thank you!
Jason