Added function def for serial0_read()
This commit is contained in:
parent
6a93851d19
commit
3e61ba3e05
10
avr_usart.c
10
avr_usart.c
|
@ -135,11 +135,15 @@ unsigned char rx_usart0(void) {
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Inupt: None
|
* Inupt: A serialbuffer and length
|
||||||
* Output: None
|
* 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue