summaryrefslogtreecommitdiffstats
path: root/device/uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'device/uart.c')
-rw-r--r--device/uart.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/device/uart.c b/device/uart.c
new file mode 100644
index 0000000..6728ab1
--- /dev/null
+++ b/device/uart.c
@@ -0,0 +1,13 @@
+#include "device/uart.h"
+#include "device/portio_uart.h"
+
+void
+uart_write(objdir_t *dir, uint64_t entryi, const char *s, size_t w)
+{
+ objdir_entry_t *entry = objdir_seek(dir, entryi);
+ if(entry == NULL || entry->type != KO_DEV_UART) return;
+
+#ifdef ENABLE_PORTIO_UART
+ portio_uart_write(entry->data, s, w);
+#endif
+}