uart: can now write more stuff

This commit is contained in:
Paul Mathieu 2021-03-14 12:17:48 -07:00
parent 7841987b6e
commit 6609dfa4b1
2 changed files with 7 additions and 0 deletions

View File

@ -21,3 +21,9 @@ char uart_read(struct uart* uart) {
return uart->data; return uart->data;
} }
void uart_writen(struct uart* uart, const char* data, int len) {
for (int i = 0; i < len; ++i) {
uart_write(uart, data[i]);
}
}

View File

@ -14,3 +14,4 @@ int uart_rx_available(struct uart* uart);
int uart_tx_available(struct uart* uart); int uart_tx_available(struct uart* uart);
void uart_write(struct uart* uart, const char c); void uart_write(struct uart* uart, const char c);
char uart_read(struct uart* uart); char uart_read(struct uart* uart);
void uart_writen(struct uart* uart, const char* data, int len);