summaryrefslogtreecommitdiff
path: root/ports/risc-v64/gnu/example_build/qemu_virt/uart.h
diff options
context:
space:
mode:
Diffstat (limited to 'ports/risc-v64/gnu/example_build/qemu_virt/uart.h')
-rw-r--r--ports/risc-v64/gnu/example_build/qemu_virt/uart.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/ports/risc-v64/gnu/example_build/qemu_virt/uart.h b/ports/risc-v64/gnu/example_build/qemu_virt/uart.h
new file mode 100644
index 00000000..2b95d500
--- /dev/null
+++ b/ports/risc-v64/gnu/example_build/qemu_virt/uart.h
@@ -0,0 +1,21 @@
+/***************************************************************************
+ * Copyright (c) 2024 Microsoft Corporation
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+#ifndef RISCV_UART_H
+#define RISCV_UART_H
+
+#define UART0 0x10000000L
+#define UART0_IRQ 10
+
+#define puts uart_puts
+int uart_init(void);
+int uart_putc(int ch);
+int uart_puts(const char* str);
+#endif