mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
ps2 mouse
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user