I am trying to receive string through serial communication. but I get the error "invalid initializer". what could be the mistake I have done??
int main{
//more codes here
while(1){
//more codes here
unsigned char mssg[] = USART_RXchar();
}
return 0;
}
unsigned char USART_RXchar(void){
while ((UCSRA & (1 << RXC)) == 0);
return(UDR);
}