From 3c2a519ee9ab1ee5fcf043eb403242859b541d6b Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Thu, 3 Apr 2025 23:38:33 -0400 Subject: serial and tty --- kernel/include/comus/drivers/tty.h | 27 +++++++++++++++++++++++++++ kernel/include/comus/drivers/uart.h | 19 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 kernel/include/comus/drivers/tty.h create mode 100644 kernel/include/comus/drivers/uart.h (limited to 'kernel/include') diff --git a/kernel/include/comus/drivers/tty.h b/kernel/include/comus/drivers/tty.h new file mode 100644 index 0000000..c951c3e --- /dev/null +++ b/kernel/include/comus/drivers/tty.h @@ -0,0 +1,27 @@ +/** + * @file tty.h + * + * @author Freya Murphy + * + * Terminal output + */ + +#ifndef TTY_H_ +#define TTY_H_ + +/** + * Initalize the terminal + */ +void tty_init(void); + +/** + * Output a character to the terminal + */ +void tty_out(char c); + +/** + * Output a string to the terminal + */ +void tty_out_str(char *str); + +#endif /* tty.h */ diff --git a/kernel/include/comus/drivers/uart.h b/kernel/include/comus/drivers/uart.h new file mode 100644 index 0000000..9a2d70a --- /dev/null +++ b/kernel/include/comus/drivers/uart.h @@ -0,0 +1,19 @@ +/** + * @file uart.h + * + * @author Freya Murphy + * + * Serial interface + */ + +#ifndef UART_H_ +#define UART_H_ + +#include + +int uart_init(void); +uint8_t uart_in(void); +void uart_out(uint8_t ch); +void uart_out_str(const char *str); + +#endif /* uart.h */ -- cgit v1.2.3-freya