Tool/software: Code Composer Studio
Hi,
I wanna do a string loopback with F28379D. There is an example code wherein we do a string write and char read.
for (;;)
{
msg = "\r\nEnter a character: \0";
SCI_writeCharArray(SCIB_BASE, (uint16_t*) msg, strlen(msg));
//
// Read a character from the FIFO.
//
receivedChar = SCI_readCharArray(SCIB_BASE, (unit16_t*)receivedChar, 100) //
//Now Here i wanna do a string read insted of char. I am adding below statement
//receivedChar = SCI_readCharArray(SCIB_BASE, (unit16_t*)receivedChar, 100);
//the syntax is :void SCI_readCharArray ( uint32_t base, uint16_t const array, uint16_t length ) Now PLease tell me how to do it. Also If we don't know the size ofstring to be received, then How to define the size?
//
// Echo back the character.
//
msg = " You sent: \0";
SCI_writeCharArray(SCIB_BASE, (uint16_t*) msg, strlen(msg));
SCI_writeCharArray(SCIB_BASE, (uint16_t*) receivedChar, strlen(receivedChar));
//
// Increment the loop count variable.
//
loopCounter++;
}