Make Uart driver universal

This commit is contained in:
2020-02-24 18:50:09 +01:00
parent 4bc85d474f
commit 5012b726cd
6 changed files with 208 additions and 104 deletions

View File

@@ -23,6 +23,7 @@
#include <errno.h>
#include <stddef.h>
extern struct stm_uart shell_uart;
char* _sbrk(int incr)
{
@@ -87,6 +88,6 @@ int _read(void)
int _write(int fd, const void *buf, int count)
{
if (fd == 1)
uart_send_array_with_dma((char*)buf, count);
uart_send_array_with_dma(&shell_uart, (char *)buf, count);
return count;
}