diff options
author | Christian Cunningham <cc@localhost> | 2022-03-24 18:52:56 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-03-24 18:52:56 -0700 |
commit | 7753da66d7d72f441dadd76f357fd5ceb50e7c8f (patch) | |
tree | c79cee644108ecb65952eff2104127a19e72d0c4 /usr/uart.c | |
parent | 78493b1d441ef888910cf958a16f260bc3c1a7bd (diff) |
Modularize Userspace
Diffstat (limited to 'usr/uart.c')
-rw-r--r-- | usr/uart.c | 22 |
1 files changed, 22 insertions, 0 deletions
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 <graphics/lfb.h> +#include <sys/schedule.h> +#include <usr/string.h> +#include <usr/uart.h> + +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); + } +} |