From 7753da66d7d72f441dadd76f357fd5ceb50e7c8f Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Thu, 24 Mar 2022 18:52:56 -0700 Subject: Modularize Userspace --- usr/uart.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 usr/uart.c (limited to 'usr/uart.c') diff --git a/usr/uart.c b/usr/uart.c new file mode 100644 index 0000000..8782a74 --- /dev/null +++ b/usr/uart.c @@ -0,0 +1,22 @@ +#define USR_UART_C +#include +#include +#include +#include + +void handle_data(unsigned char data) +{ + // Newline Case + if (data == 0x0D) { + // Backspace Case + } else if (data == 0x08 || data == 0x7F) { + } else if (data == 0x61) { + add_thread(uart_scheduler, 0, 2); + } else if (data == 0x62) { + //add_thread(test_entry, 0, 2); + } + // Draw it on the screen + { + draw_chex32(0, 9, data, 0xAA00FF); + } +} -- cgit v1.2.1