Added function def for serial0_read()

This commit is contained in:
Jake Goodwin 2023-01-14 11:41:11 -08:00
parent 6a93851d19
commit 3e61ba3e05
1 changed files with 7 additions and 3 deletions

View File

@ -135,11 +135,15 @@ unsigned char rx_usart0(void) {
/*
* Inupt: None
* Inupt: A serialbuffer and length
* Output: None
* Description:
* Description: Reads the serial data into a buffer of x length.
*/
void serial0_read(char* buffer, uint8_t buf_length) {
for(uint8_t i = 0; i < buf_length; i++) {
buffer[i] = rx_usart0();
}
}