diff options
author | Freya Murphy <freya@freyacat.org> | 2025-04-03 23:38:33 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-04-03 23:38:33 -0400 |
commit | 3c2a519ee9ab1ee5fcf043eb403242859b541d6b (patch) | |
tree | e5571b4732f1366e36c7da5ce08dcb4c18913f1e /kernel/include | |
parent | pci (diff) | |
download | comus-3c2a519ee9ab1ee5fcf043eb403242859b541d6b.tar.gz comus-3c2a519ee9ab1ee5fcf043eb403242859b541d6b.tar.bz2 comus-3c2a519ee9ab1ee5fcf043eb403242859b541d6b.zip |
serial and tty
Diffstat (limited to 'kernel/include')
-rw-r--r-- | kernel/include/comus/drivers/tty.h | 27 | ||||
-rw-r--r-- | kernel/include/comus/drivers/uart.h | 19 |
2 files changed, 46 insertions, 0 deletions
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 <freya@freyacat.org> + * + * 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 <freya@freyacat.org> + * + * Serial interface + */ + +#ifndef UART_H_ +#define UART_H_ + +#include <stdint.h> + +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 */ |