Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 22294

Compiler/MSP430G2553: 1934-D concatenation with ";" , "("

$
0
0

Part Number:MSP430G2553

Tool/software: TI C/C++ Compiler

Hello I am using downloaded SPI code to read and write data in SPI bus. While compiling code I am getting following warnings.

Appreciated any help on this:

Warning:

Description Resource Path Location Type
#1934-D concatenation with ";" in macro "MCU_IO_CLR_PREP" does not create a valid token CC110x.c /

Area in Code:

#define st(x)      do { x } while (__LINE__ == -1)

#define HAL_SPI_BEGIN       st( HAL_SPI_CS_ASSERT; while(HAL_SPI_SOMI_VAL); )

static uint8_t halSpiStrobe(uint8_t cmd)
{
    uint8_t rc;

    HAL_SPI_BEGIN;
    HAL_SPI_TXBUF_SET(cmd);
    HAL_SPI_WAIT_RXFIN;      //wait for completion of TX (which is also an RX)
   	rc = HAL_SPI_RXBUF;
    HAL_SPI_END;
    return(rc);
}

Similarly another warning:

#1934-D concatenation with ")" in macro "MCU_IO_GET_PREP" does not create a valid token CC110x.c

#define MCU_IO_GET_PREP(port, pin)         (P##port##IN & BIT##pin##)

#define MCU_IO_GET(port, pin)          MCU_IO_GET_PREP(port, pin)

#define HAL_SPI_SOMI_VAL    MCU_IO_GET(HAL_SPI_SOMI_PORT, HAL_SPI_SOMI_PIN)

void CC110xResetChip(void)
{

	 // Toggle chip select signal
	 HAL_SPI_CS_DEASSERT;
	 DelayForUS(20);
	 HAL_SPI_CS_ASSERT;
	 DelayForUS(20);
	 HAL_SPI_CS_DEASSERT;
	 DelayForUS(60);

   // Send SRES command
	HAL_SPI_CS_ASSERT;

	while(HAL_SPI_SOMI_VAL);
	HAL_SPI_TXBUF_SET(CC1100_CMD_SRES);
	HAL_SPI_WAIT_RXFIN;
//	while(UCB0STAT&UCBUSY);
	DelayForUS(5);
	// Wait for chip to finish internal reset
	while (HAL_SPI_SOMI_VAL);
	HAL_SPI_CS_DEASSERT;
}


Viewing all articles
Browse latest Browse all 22294

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>