mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 12:16:31 +00:00
🆕 实现简单的读取键盘数据的功能
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user