🆕 鼠标驱动(有bug,还不能用)

This commit is contained in:
fslongjin
2022-03-17 20:51:14 +08:00
parent 95dc53bda8
commit b3cbd3caa2
8 changed files with 455 additions and 10 deletions

View File

@ -16,6 +16,7 @@
#include "driver/multiboot2/multiboot2.h"
#include "driver/acpi/acpi.h"
#include "driver/keyboard/keyboard.h"
#include "driver/mouse/mouse.h"
unsigned int *FR_address = (unsigned int *)0xb8000; //帧缓存区的地址
@ -162,6 +163,7 @@ void system_initialize()
cpu_init();
keyboard_init();
mouse_init();
// test_slab();
// test_mm();
@ -178,8 +180,23 @@ void Start_Kernel(void)
// show_welcome();
// test_mm();
/*
while (1)
{
keyboard_analyze_keycode();
struct mouse_packet_3bytes packet = {0};
//struct mouse_packet_4bytes packet = {0};
int errcode = 0;
errcode = mouse_get_packet(&packet);
if(errcode == 0)
{
printk_color(GREEN, BLACK, " (Mouse: byte0:%d, x:%3d, y:%3d)\n", packet.byte0, packet.movement_x, packet.movement_y);
//printk_color(GREEN, BLACK, " (Mouse: byte0:%d, x:%3d, y:%3d, byte3:%3d)\n", packet.byte0, packet.movement_x, packet.movement_y, (unsigned char)packet.byte3);
}
}
*/
while(1);
}
void ignore_int()