diff options
author | Christian Cunningham <cc@localhost> | 2021-12-04 19:24:16 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2021-12-04 19:24:16 -0700 |
commit | e842c512179d3f34731ce78e3a906c5fec162e07 (patch) | |
tree | eba577f86bafe3171441fb54de8d1487576c6c3f /src/cpu | |
parent | ee7d1dea9de7723a92c4598814e5f1cff67c0d07 (diff) |
Created UART console layout
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/irq.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/cpu/irq.c b/src/cpu/irq.c index cdbd615..2673cc8 100644 --- a/src/cpu/irq.c +++ b/src/cpu/irq.c @@ -23,23 +23,22 @@ void c_irq_handler(void) { cntfrq = read_cntfrq(); write_cntv_tval(cntfrq); enable_cntv(); - uart_string((char*)"Timer \033[92mEnabled\033[0m\n"); + uart_string((char*)"\033[?25l\033[s\033[4;1H\033[0KTimer: \033[92mEnabled\033[0m\033[u\033[?25h"); } else { disable_cntv(); - uart_string((char*)"Timer \033[91mDisabled\033[0m\n"); + uart_string((char*)"\033[?25l\033[s\033[4;1H\033[0KTimer: \033[91mDisabled\033[0m\033[u\033[?25h"); } } else { if (data == 0x0D) { - uart_char(0x0a); + //uart_char(0x0a); + uart_char(data); + uart_string("\033[?25l> \033[0K\033[?25h"); } else if (data == 0x08) { uart_char((unsigned char)data); uart_char(0x20); uart_char((unsigned char)data); } else { uart_char((unsigned char)data); - //uart_char(0x20); - //uart_hexn(data); - //uart_string((char*)" c_irq_handler\n"); } } enable_irq(); |