Receive data from uart and compare

Hi,
I want to receive data from uart1, store that data and compare with other data

static bool EvhDataUart1(u16 datalength, u8 *data)
{
   u16 i;
   for ( i = 0 ; i < datalength ; i++ )
           {
            txt[i]=data[i];
            	adl_fcmSendData(handle_uart1,txt,datalength);
           }
   return TRUE;
}/*EvhDataUart1*/

Sounds like a pretty standard exercise for a basic ‘C’ programming class - where, exactly, is the problem :question:

Links to some basic ‘C’ programming resources here: blog.antronics.co.uk/2011/08/08/

If I were you I would comment out the line

.

Assuming the “txt” is an external char where you store the data, what would you compare data against?