more detailed comments in uart.c

This commit is contained in:
2019-12-01 06:18:59 +00:00
parent e2f75268c1
commit 9f817ebf1b

4
uart.c
View File

@@ -42,11 +42,11 @@ void read_sync(char buffer[], uint8_t buffersize, uint8_t * bufferindex){
while ((UART_CTRL_REGA & (1 << UART_RXC_BM)) == 0);
input = UART_DATA_REG;
putchar(input); //echo
putchar(input); // echo
buffer[*bufferindex]=input;
*bufferindex=*bufferindex+1;
}while(!(input == '\n' || input == '\r'));
buffer[*bufferindex]=0;
buffer[*bufferindex]=0; // null terminate
putchar('\n');
}