H,
I need to Copy int array elements into another int array. Here is the function.
Code:
uint8_t SPI_Exchange8bitBuffer(uint8_t *dataIn, uint8_t bufLen, uint8_t *dataOut)
{
uint8_t bytesWritten = 0;
extern volatile uint8_t buf[];
if(dataOut != NULL)
{
while(bytesWritten < bufLen )
{
dataOut[bytesWritten] = Send_data(dataIn);
bytesWritten++;
}
strncpy(buf, dataOut, bytesWritten); //Is this correct?
}
}
Will buf contain all received elements of dataOut? Is there any issue as buf is an int array and dataOut is a pointer to int array?
--David