To be more precise, ‘C’ string handling functions rely upon a NUL character to terminate strings.
You didn’t Preview your post - did you?
You forgot the ‘Code’ tags!
You don’t really gain anything by writing ‘\0’ - you might as well just write a zero:
if( atwritecnt>90 )
{
Rawdata[atwritecnt] = 0; // NUL terminator
adl_atSendResponsePort( ADL_AT_RSP, uart1_port, Rawdata );
adl_atSendResponsePort( ADL_AT_RSP, uart1_port, "\n" );
atwritecnt=0;
}
Note that “NUL” (with a single ‘L’) is the name give to the code value zero by ASCII - not to be confused with the ‘C’ NULL pointer value…