Hello. I am using msp4305438A. The FET debugger is msp430-UIF. I want to transfer "HELLO" to a slave using I2C. My code is as follows. I am getting an error message that
Error:expected a declaration
Error while running C/C++ compiler.
#include"msp430.h"
{
WDTCTL = WDTPW + WDTHOLD;
UCB0CTL0 = UCA10_0 + UCSLA10_0 + UCMM_0 + UCMST_1 + UCMODE_3 + UCSYNC_1;
UCB0CTL1 = UCSSEL_2 + UCTR_1 + UCT0STT + UCSWRST;
unsigned char x[5]={0x48,0x45,0x4C,0x4C,0x4F};
char *ptr;
ptr = &x;
UCB0TXBUF = *ptr;
ptr++;
UCB0CTL1 = UCT0STP;
_EINT();
_BIS_SR(LPM0_bits);
while(1);
}