diff options
author | Christian Cunningham <cc@localhost> | 2022-01-31 19:05:50 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-01-31 19:05:50 -0700 |
commit | a1f49718aee378fa075303c86106309091d56b80 (patch) | |
tree | daa43fe9db527b69bc3b5e9cd967e6e5de5f5e29 /src/cpu | |
parent | 09d5025fc34644a6e04380a61da15ba5d8e3f775 (diff) |
Break exceptions off to own files
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/irq.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/src/cpu/irq.c b/src/cpu/irq.c index e6c6a80..7f2a89e 100644 --- a/src/cpu/irq.c +++ b/src/cpu/irq.c @@ -97,49 +97,24 @@ void handle_data(unsigned char data) if (off < 2048) { // Newline Case if (data == 0x0D) { - for(int i = off; i>=0;i--) - cmd[i] = 0x0; - off = 0; // Backspace Case } else if (data == 0x08 || data == 0x7F) { - if (off > 0) { - off -= 1; - } - cmd[off] = 0x0; // Lock Case } else if (data == 0x6C) { - cmd[off] = (char) data; - off += 1; lock_mutex(&exe_cnt_m, SYS_PID); // Release Case } else if (data == 0x72) { - cmd[off] = (char) data; - off += 1; release_mutex(&exe_cnt_m, SYS_PID); } else if (data == 0x61) { - cmd[off] = (char) data; - off += 1; add_thread(testfxn, 0, 3); } else if (data == 0x62) { - cmd[off] = (char) data; - off += 1; add_thread(uart_scheduler, 0, 2); + } else if (data == 0x63) { + add_thread(heap_info, 0, 2); // Else output } else { - cmd[off] = (char) data; - off += 1; } } else if (off == 2048) { - if (data == 0x0D) { - for(int i = off; i>=0;i--) - cmd[i] = 0x0; - off = 0; - } else if (data == 0x08 || data == 0x7F) { - if (off > 0) { - off -= 1; - } - cmd[off] = 0x0; - } } cmdidx = off; g_Drawer.x = 0; |