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.

MSP430G2230: MSP430G2230 and I2C

Part Number: MSP430G2230

I'm starting a new project and would like to use the USI library for a I2C communication.

I the examples but get undefined when compiling?

My code:

#include "stdint.h"
#include "USI_I2CMaster.h"

#include "msp430g2230.h"

// default slave address of sensor is 0x29

int door_state=0,mub=1,iv1=0;
unsigned int ic0=0,ic2=1,iv,iout,k=0,m=0,in=0,p=500,ivi=20;
unsigned int LDS=0,ack1=1,slvw=0x28,slvr=0x29;
unsigned char c;


int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P1REN=0x1B; // Terminate unavailable Port1 pins (P1.0/1/3/4) properly
P1DIR = 0x24; // Set P1 to output direction
P1OUT=0x00;
TACCR0=47300; // MEASURED FOR 333 msec.
TACCTL0=CCIE;
TACTL=MC_1|ID_3|TASSEL_2|TACLR;
mub=1;

TI_USI_I2C_MasterInit(USIDIV_7+USISSEL_2+USICKPL, StatusCallback); //error occurs here as "undefined StatusCallback"


__enable_interrupt();
for (;;)
{

__low_power_mode_0();
}
}

#pragma vector=TIMERA0_VECTOR
__interrupt void TA0_ISR (void)
{
ic0++;
if(LDS==0 && (ic0&1)==0) // STARTUP STATUS
{
ic2++;
iout= ((ic2&1)<<2)|((ic2&2)<<4);

P1OUT=iout;
if(ic2>12)
{
LDS=1;
ic2=0;
}
}
else if (LDS==1)
{
P1OUT=0x24;
}
}

int StatusCallback(unsigned char c)
{
return TI_USI_EXIT_LPM;
}

**Attention** This is a public forum