Receive data from uart and compare

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++ )
   return TRUE;

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:

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?