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.

CCS/HDC1080: how to fix gmake*** errors

Part Number: HDC1080
Other Parts Discussed in Thread: MSP430FR4133,

Tool/software: Code Composer Studio

Hi everyone,

I try to connect msp430fr4133 with hdc1080 by I2C.

My Code is shown below.

when I compile this code, gmake error occur.

please let me know  how to fix this error.

Regards, 

Takuya

/* --COPYRIGHT--,BSD
 * Copyright (c) 2014, Texas Instruments Incorporated
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * *  Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * *  Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * *  Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * --/COPYRIGHT--*/
/*******************************************************************************
 *
 * main.c
 *
 * Out of Box Demo for the MSP-EXP430FR4133
 * Main loop, initialization, and interrupt service routines
 *
 * September 2014
 * E. Chen
 *
 ******************************************************************************/

#include "main.h"
#include "hal_LCD.h"

#define SLAVE_ADDRESS 0x40
#define RXCOUNT 0x04

//unsigned char TXData = 0x38;

volatile float res;//////////////////////////10.26 damien
volatile float abT;//////////////////////////10.26 damien

unsigned char FeedbackValue[8];
uint8_t i=0, j=0;

/* Variables */
static uint8_t RXData[RXCOUNT];
static volatile uint8_t xferIndex;
static volatile uint32_t humidity;
static volatile double temperature;
static volatile double DEWpoint;  //////////////////////10.26 damien
static volatile bool stopSent;
volatile unsigned char holdCount = 0;

volatile unsigned char * mode = &BAKMEM4_L;                   // mode flag

// TimerA0 UpMode Configuration Parameter
Timer_A_initUpModeParam initUpParam_A0 =
{
		TIMER_A_CLOCKSOURCE_ACLK,               // SMCLK Clock Source
		TIMER_A_CLOCKSOURCE_DIVIDER_1,          // ACLK/1 = 32kHz
		3277,                                   // 100ms debounce period
		TIMER_A_TAIE_INTERRUPT_DISABLE,         // Disable Timer interrupt
		TIMER_A_CCIE_CCR0_INTERRUPT_ENABLE ,    // Enable CCR0 interrupt
		TIMER_A_DO_CLEAR,                       // Clear value
		true                                    // Start Timer
};

/*
 * main.c
 */
int main(void) {
    //_q test1, test2;
	//test1 = _Q(1.2);
	//test2 = _Qlog(test1);

    // Stop Watchdog timer
    WDT_A_hold(__MSP430_BASEADDRESS_WDT_A__);     // Stop WDT

    _q10 qA, qC;////////////////////////////10.26 damien

    // Check if a wakeup from LPMx.5
    if (SYSRSTIV == SYSRSTIV_LPM5WU)
    {
        Init_GPIO();
        __enable_interrupt();
    }
    else
    {
        // Initializations
        Init_GPIO();
        Init_I2C();
        Init_Clock();
        Init_RTC();
        Init_LCD();

        GPIO_clearInterrupt(GPIO_PORT_P1, GPIO_PIN2);

        *mode = 0;

        __enable_interrupt();

        displayScrollText("HDC1080 DEMO");

        FeedbackValue[0] = 0xFA;
        FeedbackValue[7] = 0xFB;
    }

    while(1)
    {
        LCD_E_selectDisplayMemory(LCD_E_BASE, LCD_E_DISPLAYSOURCE_MEMORY);

        /* Making sure the last transaction has been completely sent out */
        while (EUSCI_B_I2C_masterIsStopSent(EUSCI_B0_BASE) == EUSCI_B_I2C_SENDING_STOP);

        /* Send start and the first byte of the transmit buffer. We have to send
         * two bytes to clean out whatever is in the buffer from a previous
         * send  */
        EUSCI_B_I2C_masterSendMultiByteStart(EUSCI_B0_BASE, 0x00);

        /* Enabling transfer interrupt after stop has been sent */
        EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE, EUSCI_B_I2C_TRANSMIT_INTERRUPT0);

        while(!stopSent) __bis_SR_register(CPUOFF + GIE);
        stopSent = false;

        temperature = ((RXData[0]<<8)+RXData[1]);                             //////10.27 damien top
    	temperature = (temperature*165/65536-40)*10;
    	humidity = ((RXData[2]<<8)+RXData[3])&0x0000FFFF;
    	humidity = humidity*1000/65536;

    	qA = _Q10((float)humidity/1000);
    	qC = _Q10log(qA);
    	res = _Q10toF(qC);
    	abT = 17.271*(float)temperature/10/(237.7+(float)temperature/10);
    	DEWpoint = 237.7*(res+abT)/(17.271-res-abT);

    	FeedbackValue[1] = ((int)temperature & 0xFF00)>>8;
    	FeedbackValue[2] = (int)temperature & 0xFF;
    	FeedbackValue[3] = (humidity & 0xFF00)>>8;
    	FeedbackValue[4] = humidity & 0xFF;
    	FeedbackValue[5] = ((int)(DEWpoint*10.0) & 0xFF00)>>8;
    	FeedbackValue[6] = (int)(DEWpoint*10.0) & 0xFF;                     //////10.27 damien end


        clearLCD();

        switch(*mode)
        {
            case TEMPERATURE_MODE:        // Temperature mode
            	//temperature = ((RXData[0]<<8)+RXData[1]);
            	//temperature = (temperature*165/65536-40)*10;
            	showChar('T',pos2);
                LCDMEM[7] |= 0x04;
                LCDBMEM[7] |= 0x04;
                // Handles displaying up to 99.9 degrees
                if (temperature>=1)
                {
                	if (temperature>=100) showChar(((uint32_t) temperature/100)%10 + '0',pos3);
                	if (temperature>=10) showChar(((uint32_t) temperature/10)%10 + '0',pos4);
                	if (temperature>=1) showChar(((uint32_t) temperature/1)%10 + '0',pos5);
                }
                else
                {
                	LCDMEM[pos1] |= 0x01;
                	if (temperature<=-100) showChar(((uint32_t) (400-(400+temperature))/100)%10 + '0',pos3);
                	if (temperature<=-10) showChar(((uint32_t) (400-(400+temperature))/10)%10 + '0',pos4);
                	if (temperature<1) showChar(((uint32_t) (400-(400+temperature))/1)%10 + '0',pos5);
                }
                LCDMEM[pos4+1] |= 0x01;	// Decimal point
                LCDMEM[pos5+1] |= 0x04;	// Degree symbol
                showChar('C',pos6);

                break;
            case HUMIDITY_MODE:         // Humidity mode
            	//humidity = ((RXData[2]<<8)+RXData[3])&0x0000FFFF;
            	//humidity = humidity*1000/65536;
            	showChar('H',pos2);
                LCDMEM[7] |= 0x04;
                LCDBMEM[7] |= 0x04;
                // Handles humidity up to 99.9 percent
                if (humidity>=999) {showChar('9',pos3); showChar('9',pos4); showChar('9',pos5);}
                if (humidity>=100) showChar((humidity/100)%10 + '0',pos3);
                if (humidity>=10) showChar((humidity/10)%10 + '0',pos4);
                if (humidity>=1) showChar((humidity/1)%10 + '0',pos5);
                if (humidity==0) {showChar('0', pos4); showChar('0',pos5);}
                LCDMEM[pos4+1] |= 0x01;	// Decimal point

                break;
            case Dew_MODE:        // Dew_MODE
            	/*temperature = ((RXData[0]<<8)+RXData[1]);
            	temperature = (temperature*165/65536-40)*10;
            	humidity = ((RXData[2]<<8)+RXData[3])&0x0000FFFF;
            	humidity = humidity*1000/65536;

                //qA = _Q(2.71828);  qC = _Qlog(qA);    res=_QtoF(qC);    // 1.0 = ln(e)  //////10.26 damien
            	qA = _Q12((float)humidity/1000);
            	qC = _Q12log(qA);
            	res = _Q12toF(qC);

            	abT = 17.271*(float)temperature/10/(237.7+(float)temperature/10);
            	DEWpoint = 237.7*(res+abT)/(17.271-res-abT);*/

                showChar('D',pos2);
                LCDMEM[7] |= 0x04;
                LCDBMEM[7] |= 0x04;
                // Handles displaying up to 99.9 degrees
                if (DEWpoint*10.0>=1)
                {
                	if ((DEWpoint*10.0)>=100) showChar(((uint32_t) (DEWpoint*10.0)/100)%10 + '0',pos3);
                	if ((DEWpoint*10.0)>=10) showChar(((uint32_t) (DEWpoint*10.0)/10)%10 + '0',pos4);
                	if ((DEWpoint*10.0)>=1) showChar(((uint32_t) (DEWpoint*10.0)/1)%10 + '0',pos5);
                }
                else
                {
                	LCDMEM[pos1] |= 0x01;
                	if ((DEWpoint*10.0)<=-100) showChar(((uint32_t) (400.0-(400.0+(DEWpoint*10.0)))/100)%10 + '0',pos3);
                	if ((DEWpoint*10.0)<=-10) showChar(((uint32_t) (400.0-(400.0+(DEWpoint*10.0)))/10)%10 + '0',pos4);
                	if ((DEWpoint*10.0)<1) showChar(((uint32_t) (400.0-(400.0+(DEWpoint*10.0)))/1)%10 + '0',pos5);
                }
                LCDMEM[pos4+1] |= 0x01;	// Decimal point
                LCDMEM[pos5+1] |= 0x04;	// Degree symbol
                showChar('C',pos6);

                break;
        }


        /////////////////////////////////////
        //while(!(UCA0IFG & UCTXIFG));
        //        UCA0TXBUF = TXData;                   // Load data onto buffer
        //////////////////////////////////////////

        __bis_SR_register(LPM0_bits | GIE);         // enter LPM3
    }
}

/*
 * GPIO Initialization
 */
void Init_GPIO()
{
    // Set all GPIO pins to output low to prevent floating input and reduce power consumption
    GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setOutputLowOnPin(GPIO_PORT_P2, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setOutputLowOnPin(GPIO_PORT_P3, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setOutputLowOnPin(GPIO_PORT_P4, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setOutputLowOnPin(GPIO_PORT_P5, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setOutputLowOnPin(GPIO_PORT_P6, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setOutputLowOnPin(GPIO_PORT_P7, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setOutputLowOnPin(GPIO_PORT_P8, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);

    GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setAsOutputPin(GPIO_PORT_P2, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setAsOutputPin(GPIO_PORT_P3, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setAsOutputPin(GPIO_PORT_P4, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setAsOutputPin(GPIO_PORT_P5, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setAsOutputPin(GPIO_PORT_P6, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setAsOutputPin(GPIO_PORT_P7, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
    GPIO_setAsOutputPin(GPIO_PORT_P8, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);

    //GPIO_setAsInputPin(GPIO_PORT_P1, GPIO_PIN1);

    // Configure button S1 (P1.2) interrupt
    GPIO_selectInterruptEdge(GPIO_PORT_P1, GPIO_PIN2, GPIO_HIGH_TO_LOW_TRANSITION);
    GPIO_setAsInputPinWithPullUpResistor(GPIO_PORT_P1, GPIO_PIN2);
    GPIO_clearInterrupt(GPIO_PORT_P1, GPIO_PIN2);
    GPIO_enableInterrupt(GPIO_PORT_P1, GPIO_PIN2);


    // Set P4.1 and P4.2 as Secondary Module Function Input, LFXT.
    GPIO_setAsPeripheralModuleFunctionInputPin(
           GPIO_PORT_P4,
           GPIO_PIN1 + GPIO_PIN2,
           GPIO_PRIMARY_MODULE_FUNCTION
           );

    // Configure Pins for I2C
    /*
     * Select Port 5
     * Set Pin 2, 3 to input with function, (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).
     */
    GPIO_setAsPeripheralModuleFunctionInputPin(
        GPIO_PORT_P5,
        GPIO_PIN2 + GPIO_PIN3,
        GPIO_PRIMARY_MODULE_FUNCTION
        );


    ///////////////////////////////////////////
    // Configure UART pins
       P1SEL0 |= BIT0 | BIT1;                    // set 2-UART pin as second function

       // Configure UART
       UCA0CTLW0 |= UCSWRST;                     // Put eUSCI in reset
       UCA0CTLW0 |= UCSSEL__SMCLK;
       // Baud Rate calculation
       UCA0BR0 = 78;                              // 1000000/9600 = 104.16666
       UCA0BR1 = 0;
       UCA0CTLW0 &= ~UCSWRST;                    // Initialize eUSCI
       UCA0IE |= UCRXIE;                         // Enable USCI_A0 RX interrupt
    ///////////////////////////////////////////////

    // Disable the GPIO power-on default high-impedance mode
    // to activate previously configured port settings
    PMM_unlockLPM5();
}

/*
 * I2C Initialization
 */
void Init_I2C()
{
    EUSCI_B_I2C_initMasterParam param = {0};
    param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK;
    param.i2cClk = CS_getSMCLK();
    param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_100KBPS;
    param.byteCounterThreshold = 0;
    param.autoSTOPGeneration =
    		EUSCI_B_I2C_NO_AUTO_STOP;
    EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);

    UCB0BRW = 0x08;

    //Specify slave address
    EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE,
                                SLAVE_ADDRESS
                                );

    //Set Master in transmit mode
    EUSCI_B_I2C_setMode(EUSCI_B0_BASE,
                        EUSCI_B_I2C_TRANSMIT_MODE
                        );

    //Enable I2C Module to start operations
    EUSCI_B_I2C_enable(EUSCI_B0_BASE);

    EUSCI_B_I2C_clearInterrupt(EUSCI_B0_BASE,
                               EUSCI_B_I2C_TRANSMIT_INTERRUPT0 +
							   EUSCI_B_I2C_RECEIVE_INTERRUPT0 +
                               EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT +
                               EUSCI_B_I2C_NAK_INTERRUPT
                               );

    //Enable master Transmit interrupt
    EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE,
                                EUSCI_B_I2C_TRANSMIT_INTERRUPT0
                                );
}

/*
 * Clock System Initialization
 */
void Init_Clock()
{
    // Intializes the XT1 crystal oscillator
    CS_turnOnXT1(CS_XT1_DRIVE_1);
}

/*
 * Real Time Clock counter Initialization
 */
void Init_RTC()
{
    // Set RTC modulo to 32768-1 to trigger interrupt every ~250 ms
    RTC_setModulo(RTC_BASE, 3277);
    RTC_enableInterrupt(RTC_BASE, RTC_OVERFLOW_INTERRUPT);
    RTC_start(RTC_BASE, RTC_CLOCKSOURCE_XT1CLK);
}

/*
 * PORT1 Interrupt Service Routine
 * Handles S1 button press interrupt
 */
#pragma vector = PORT1_VECTOR
__interrupt void PORT1_ISR(void)
{
    P4OUT |= BIT0;    // Turn LED1 On
    switch(__even_in_range(P1IV, P1IV_P1IFG7))
    {
        case P1IV_NONE : break;
        case P1IV_P1IFG0 : break;
        case P1IV_P1IFG1 : break;
        case P1IV_P1IFG2 :
			// Start debounce timer
			Timer_A_initUpMode(TIMER_A0_BASE, &initUpParam_A0);
			break;
        case P1IV_P1IFG3 : break;
        case P1IV_P1IFG4 : break;
        case P1IV_P1IFG5 : break;
        case P1IV_P1IFG6 : break;
        case P1IV_P1IFG7 : break;
    }
}

/*
 * Timer A0 Interrupt Service Routine
 * Used as button debounce timer
 */
#pragma vector = TIMER0_A0_VECTOR
__interrupt void TIMER0_A0_ISR (void)
{
    // Button S1 held down
    if (!(P1IN & BIT2))
    {
    	P4OUT |= ~BIT0;
        holdCount++;
        if (holdCount == 5)
        {
            // Change mode
            if (*mode == TEMPERATURE_MODE) (*mode) = HUMIDITY_MODE;
            else if (*mode == HUMIDITY_MODE)  (*mode) = Dew_MODE;    //////////////////
            else (*mode) = TEMPERATURE_MODE;
        }
    }
    // Button S1 released
    else if (P1IN & BIT2)
    {
        holdCount = 0;
        P4OUT &= ~BIT0;
        Timer_A_stop(TIMER_A0_BASE);
    }
}

/*
 * RTC Interrupt Service Routine
 * Wakes up every ~10 milliseconds to update stowatch
 */
#pragma vector = RTC_VECTOR
__interrupt void RTC_ISR(void)
{
    switch(__even_in_range(RTCIV, RTCIV_RTCIF))
    {
        case RTCIV_NONE : break;
        case RTCIV_RTCIF:
            __bic_SR_register_on_exit(LPM3_bits);            // exit LPM3
            break;
    }
}

#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=USCI_B0_VECTOR
__interrupt
#elif defined(__GNUC__)
__attribute__((interrupt(USCI_B0_VECTOR)))
#endif
void USCIB0_ISR(void)
{
	switch(__even_in_range(UCB0IV,0x1E))
	{
    case 0x00: break;       // Vector 0: No interrupts break;
    case 0x02: break;       // Vector 2: ALIFG break;
    case 0x04:
    	EUSCI_B_I2C_masterReceiveStart(EUSCI_B0_BASE);
        break;     // Vector 4: NACKIFG break;
    case 0x06: break;       // Vector 6: STT IFG break;
    case 0x08: break;       // Vector 8: STPIFG break;
    case 0x0a: break;       // Vector 10: RXIFG3 break;
    case 0x0c: break;       // Vector 14: TXIFG3 break;
    case 0x0e: break;       // Vector 16: RXIFG2 break;
    case 0x10: break;       // Vector 18: TXIFG2 break;
    case 0x12: break;       // Vector 20: RXIFG1 break;
    case 0x14: break;       // Vector 22: TXIFG1 break;
    case 0x16:
        if(xferIndex == RXCOUNT - 2)
        {
            EUSCI_B_I2C_masterReceiveMultiByteStop(EUSCI_B0_BASE);
            RXData[xferIndex++] = EUSCI_B_I2C_masterReceiveMultiByteNext(EUSCI_B0_BASE);
        }
        else if(xferIndex == RXCOUNT - 1)
        {
            RXData[xferIndex++] = EUSCI_B_I2C_masterReceiveMultiByteNext(EUSCI_B0_BASE);
            EUSCI_B_I2C_disableInterrupt(EUSCI_B0_BASE, EUSCI_B_I2C_RECEIVE_INTERRUPT0);
            EUSCI_B_I2C_disableInterrupt(EUSCI_B0_BASE, EUSCI_B_I2C_NAK_INTERRUPT);
            EUSCI_B_I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_TRANSMIT_MODE);
            xferIndex = 0;
            stopSent = true;
            __bic_SR_register_on_exit(CPUOFF);
        }
        else
        {
            RXData[xferIndex++] = EUSCI_B_I2C_masterReceiveMultiByteNext(EUSCI_B0_BASE);
        }
        break;     // Vector 24: RXIFG0 break;
    case 0x18:
        EUSCI_B_I2C_disableInterrupt(EUSCI_B0_BASE, EUSCI_B_I2C_TRANSMIT_INTERRUPT0);
        EUSCI_B_I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_RECEIVE_MODE);
        xferIndex = 0;
        EUSCI_B_I2C_masterReceiveStart(EUSCI_B0_BASE);
        EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE, EUSCI_B_I2C_RECEIVE_INTERRUPT0);
        EUSCI_B_I2C_enableInterrupt(EUSCI_B0_BASE, EUSCI_B_I2C_NAK_INTERRUPT);
    	break;       // Vector 26: TXIFG0 break;
    case 0x1a: break;
    case 0x1c: break;       // Vector 30: clock low timeout break;
    case 0x1e: break;       // Vector 32: 9th bit break;
    default: break;
	}
}




////////////////////////////////////////
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=USCI_A0_VECTOR
__interrupt void USCI_A0_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(USCI_A0_VECTOR))) USCI_A0_ISR (void)
#else
#error Compiler not supported!
#endif
{
    switch(__even_in_range(UCA0IV,USCI_UART_UCTXCPTIFG))
    {
        case USCI_NONE: break;
        case USCI_UART_UCRXIFG:
              UCA0IFG &=~ UCRXIFG;            // Clear interrupt
              if(UCA0RXBUF == 0xFF)
            	  for(i=0;i<8;i++)
            	  {
                      while(!(UCA0IFG & UCTXIFG));
                              UCA0TXBUF = FeedbackValue[i];
            	  }

              __bic_SR_register_on_exit(LPM0_bits); // Exit LPM0 on reti
              break;
        case USCI_UART_UCTXIFG: break;
        case USCI_UART_UCSTTIFG: break;
        case USCI_UART_UCTXCPTIFG: break;
    }
}