ps2 mouse

This commit is contained in:
Matheus
2024-04-14 22:22:32 -03:00
parent 7215113c14
commit 7f297728fb
8 changed files with 332 additions and 4 deletions
+29
View File
@@ -0,0 +1,29 @@
#ifndef _MOUSE_H
#define _MOUSE_H
#include <ringbuffer.h>
#include <kernel/poll.h>
#define MOUSE_FLAG_RB 1
#define MOUSE_FLAG_MB 2
#define MOUSE_FLAG_LB 4
#define MOUSE_FLAG_B4 8
#define MOUSE_FLAG_B5 16
typedef struct {
int flags;
int x,y,z;
} mousepacket_t;
typedef struct {
ringbuffer_t packetbuffer;
spinlock_t lock;
pollheader_t pollheader;
int flags;
} mouse_t;
void mouse_init();
mouse_t *mouse_new();
void mouse_packet(mouse_t *mouse, mousepacket_t *packet);
#endif