HariboteOS/day7/mouse.c
2021-03-17 23:52:39 +08:00

15 lines
308 B
C

#include "fifo.h"
#include "io.h"
#include "keyboard.h"
#include "mouse.h"
struct FIFO8 mousefifo;
unsigned char mousebuf[MOUSE_FIFO_BUF_SIZE];
void enable_mouse(void) {
wait_KBC_sendready();
io_out8(PORT_KEYCMD, KEYCMD_SENDTO_MOUSE);
wait_KBC_sendready();
io_out8(PORT_KEYDAT, MOUSECMD_ENABLE);
}