i2c driver isssue in code composer studio

Status
Not open for further replies.

sammey_geek

Junior Member level 1
Joined
May 22, 2013
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
india
Visit site
Activity points
1,395
hi,
i am using code composer studio 5 and i have written code for msp430f4784. i2c driver for eeprom AT24C128.....i am getting compilation error in interrupt service routine macro..please help me out......


/*---------------------------------------------------------------------------*/
/* Interrupt Service Routines */
#ifdef __ASM_HEADER__
#define USCIAB0TX_VECTOR ".int08" #else
#define USCIAB0TX_VECTOR (8 * 1u)
#pragma vector = USCIAB0TX_VECTOR
__interrupt void USCIAB0TX_ISR(void)
#endif
{
//Add INTERRUPT SERVICE ROUTINE HERE
//P1IFG &= ~BUTTON; // P1.3 IFG cleared
}
if(UCB0TXIFG & IFG2)
{
UCB0TXBUF = I2CBufferArray[PtrTransmit];// Load TX buffer
PtrTransmit--; // Decrement TX byte counter
if(PtrTransmit < 0)
{
while(!(IFG2 & UCB0TXIFG));
IE2 &= ~UCB0TXIE; // disable interrupts.
IFG2 &= ~UCB0TXIFG; // Clear USCI_B0 TX int flag
__bic_SR_register_on_exit(LPM0_bits); // Exit LPM0
}
}
else if(UCB0RXIFG & IFG2)
{
I2CBuffer = UCB0RXBUF; // store received data in buffer
__bic_SR_register_on_exit(LPM0_bits); // Exit LPM0
}
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…