aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-01-31 19:34:03 -0700
committerChristian Cunningham <cc@localhost>2022-01-31 19:34:03 -0700
commit1b4c8e04ded44fa11a1e95d2db5bef4b8eaddcd1 (patch)
tree6ee2fcc6de6d038dfdb4b769d081e0cc47030b8b
parenta1f49718aee378fa075303c86106309091d56b80 (diff)
Remove old global
-rw-r--r--include/globals.h2
-rw-r--r--src/cpu/irq.c41
-rw-r--r--src/globals.S6
-rw-r--r--src/sys/core.c3
4 files changed, 18 insertions, 34 deletions
diff --git a/include/globals.h b/include/globals.h
index cf37c06..2d1f7a4 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -6,8 +6,6 @@
#ifndef GLOBALS_C
extern unsigned long irqlr;
extern unsigned long cntfrq;
-extern unsigned long cmdidx;
-extern char cmd[2048];
extern char* os_name;
extern char* os_info_v;
diff --git a/src/cpu/irq.c b/src/cpu/irq.c
index 7f2a89e..24a809c 100644
--- a/src/cpu/irq.c
+++ b/src/cpu/irq.c
@@ -93,30 +93,24 @@ unsigned long c_fiq_handler(void)
void handle_data(unsigned char data)
{
- unsigned long off = cmdidx;
- if (off < 2048) {
- // Newline Case
- if (data == 0x0D) {
- // Backspace Case
- } else if (data == 0x08 || data == 0x7F) {
- // Lock Case
- } else if (data == 0x6C) {
- lock_mutex(&exe_cnt_m, SYS_PID);
- // Release Case
- } else if (data == 0x72) {
- release_mutex(&exe_cnt_m, SYS_PID);
- } else if (data == 0x61) {
- add_thread(testfxn, 0, 3);
- } else if (data == 0x62) {
- add_thread(uart_scheduler, 0, 2);
- } else if (data == 0x63) {
- add_thread(heap_info, 0, 2);
- // Else output
- } else {
- }
- } else if (off == 2048) {
+ // Newline Case
+ if (data == 0x0D) {
+ // Backspace Case
+ } else if (data == 0x08 || data == 0x7F) {
+ // Lock Case
+ } else if (data == 0x6C) {
+ lock_mutex(&exe_cnt_m, SYS_PID);
+ // Release Case
+ } else if (data == 0x72) {
+ release_mutex(&exe_cnt_m, SYS_PID);
+ } else if (data == 0x61) {
+ add_thread(testfxn, 0, 3);
+ } else if (data == 0x62) {
+ add_thread(uart_scheduler, 0, 2);
+ } else if (data == 0x63) {
+ add_thread(heap_info, 0, 2);
+ } else {
}
- cmdidx = off;
g_Drawer.x = 0;
g_Drawer.y = 7;
for(int i = 0; i < 128; i++)
@@ -124,7 +118,6 @@ void handle_data(unsigned char data)
g_Drawer.x = 0;
g_Drawer.y = 7;
write_string(&g_Drawer, "> ");
- write_string(&g_Drawer, cmd);
}
void testfxn2(void)
diff --git a/src/globals.S b/src/globals.S
index f6ec57f..b808053 100644
--- a/src/globals.S
+++ b/src/globals.S
@@ -5,9 +5,3 @@ irqlr:
.globl cntfrq
cntfrq:
.word 0
-.globl cmdidx
-cmdidx:
- .word 0
-.global cmd
-cmd:
- .space 2049
diff --git a/src/sys/core.c b/src/sys/core.c
index 39eaffd..1b71d3d 100644
--- a/src/sys/core.c
+++ b/src/sys/core.c
@@ -4,7 +4,6 @@
#include <graphics/drawer.h>
#include <graphics/lfb.h>
#include <lib/mem.h>
-#include <lib/q.h>
#include <lib/strings.h>
#include <symbols.h>
#include <sys/core.h>
@@ -22,7 +21,7 @@ void __attribute__((naked)) usr_schedule(void);
// Initialize IRQs
void sysinit(void)
{
- // Clear System Globals
+ // Initialize System Globals
exe_cnt_m.addr = &exe_cnt;
exe_cnt_m.pid = NULL_PID;
rpi_heap_top = &rpi_heap;