diff options
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); + } +} |