The Pedigree Project 0.1
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
14 ssize_t relativeX;
15 ssize_t relativeY;
16 uint32_t buttons;
17 bool overflow;
18};
19
22 public:
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
bool feed(uint8_t byte, Ps2MousePacket &packet)