ProAnswers.org

declaring the union instance as an address

__no_init volatile union {
unsigned short TACTL; // Timer_A Control
struct {
unsigned short TAIFG : 1; // Timer_A counter interrupt flag
unsigned short TAIE : 1; // Timer_A counter interrupt enable
unsigned short TACLR : 1; // Timer_A counter clear
unsigned short : 1;
unsigned short TAMC : 2; // Timer_A mode control
unsigned short TAID : 2; // Timer_A clock input divider
unsigned short TASSEL : 2; // Timer_A clock source select
unsigned short : 6;
} TACTL_bit;
} @ 0x0160;

In the above code, is it correct to declare the instance as @ 0x0160.

1 Like

__no_init is not a standard keyword. not sure how code will behave but @ 0x0160 instance is correct.