User Activity

I wish to print "String recieved" if /r or /n is detecetd otherwise i wish to print "Error" .The problem is after detecting the first string i receive an output "String Received" After which i also receive error message. I have doubt if i have implem...
The problem that I am facing is that I implemented HAL_UART_Receive_IT function in a while(1) loop and then I check for the elements of buffer for \n or \r. After I type the first message it prints "String Received". But after that it continuously ...
Below given is my code. Usbread.c<#include "Usbread.h"#include "usbd_cdc_if.h"uint8_t buffer1 [20];;uint8_t buffer_index1;uint8_t REDLED[15]= "LED RED ON ";uint8_t REDLEDF[15]= "LED RED OFF ";uint8_t GREENLED[15]= "LED GREEN ON ";uint8_t GREENLEDF[15...