Compare commits

..

2 Commits

Author SHA1 Message Date
Bananymous 12a78c822e Kernel: Explicitly construct ByteSpan from Span<uint8_t>
VSC complains about not finding proper constructor, this fixes that.
2024-01-04 12:17:55 +02:00
Bananymous e45b544a39 Kernel: Implement PS/2 mouse driver
This is realtively simple driver that queries extensions (scroll +
extra buttons) from mouse and reads mouse packages.
2024-01-04 12:17:55 +02:00
1 changed files with 2 additions and 2 deletions

View File

@ -96,8 +96,8 @@ namespace Kernel::Input
return;
uint8_t new_button_mask = m_byte_buffer[0] & 0b111;
int32_t rel_x = m_byte_buffer[1] - ((m_byte_buffer[0] << 4) & 0x100);
int32_t rel_y = m_byte_buffer[2] - ((m_byte_buffer[0] << 3) & 0x100);
int32_t rel_x = m_byte_buffer[1] - (((uint16_t)m_byte_buffer[0] << 4) & 0x100);
int32_t rel_y = m_byte_buffer[2] - (((uint16_t)m_byte_buffer[0] << 3) & 0x100);
int32_t rel_z = 0;
if (m_mouse_id == 0x03)