The Pedigree Project
0.1
src
modules
drivers
x86
ps2mouse
Ps2MousePacket.h
1
/*
2
* Copyright (c) 2026, Pedigree Developers
3
*
4
* Permission to use, copy, modify, and distribute this software for any
5
* purpose with or without fee is hereby granted.
6
*/
7
8
#ifndef PEDIGREE_PS2_MOUSE_PACKET_H
9
#define PEDIGREE_PS2_MOUSE_PACKET_H
10
11
#include "pedigree/kernel/processor/types.h"
12
13
struct
Ps2MousePacket
{
14
ssize_t relativeX;
15
ssize_t relativeY;
16
uint32_t buttons;
17
bool
overflow;
18
};
19
21
class
Ps2MousePacketDecoder
{
22
public
:
23
Ps2MousePacketDecoder
();
24
25
void
reset();
26
32
bool
feed
(uint8_t
byte
,
Ps2MousePacket
& packet);
33
34
private
:
35
uint8_t m_Buffer[3];
36
size_t
m_BufferIndex;
37
};
38
39
#endif
Ps2MousePacketDecoder
Definition
Ps2MousePacket.h:21
Ps2MousePacketDecoder::feed
bool feed(uint8_t byte, Ps2MousePacket &packet)
Definition
Ps2MousePacket.cc:39
Ps2MousePacket
Definition
Ps2MousePacket.h:13
Generated on Tue Sep 22 2026 06:05:42 for The Pedigree Project by
1.9.8