🆕 实现简单的读取键盘数据的功能

This commit is contained in:
fslongjin
2022-01-29 15:12:34 +08:00
parent 8ab02c496c
commit 39ddc21ca5
3 changed files with 25 additions and 14 deletions

View File

@ -126,6 +126,20 @@ void init_irq()
*/
void do_IRQ(ul rsp, ul number)
{
unsigned char x;
switch (number)
{
case 0x20: // 时钟中断信号
break;
case 0x21: // 键盘中断
x = io_in8(0x60);
printk_color(ORANGE, BLACK, "Received key irq, key code:%#018lx\n", x);
break;
default:
break;
}
if(number!=0x20)
printk_color(ORANGE, BLACK, "Received irq:%#018x\n", number);