The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
Loading...
Searching...
No Matches
ps2_mouse.h
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* @file ps2_mouse.h
5
* @brief the PS/2 mouse on the i8042 controller's second (aux) port.
6
*
7
* the mouse sends 3-byte packets (4 with a scroll wheel) on IRQ 12. the
8
* driver turns them into /dev/input events: BTN_LEFT, BTN_RIGHT and
9
* BTN_MIDDLE, REL_X, REL_Y and REL_WHEEL.
10
*/
11
12
#include "
common/stdint.h
"
13
14
/**
15
* find and turn on a PS/2 mouse. call with interrupts off, after the
16
* keyboard driver and the interrupt controllers are set up.
17
* @return true if a mouse answered.
18
*/
19
bool
ps2_mouse_init
(
void
);
20
21
/**
22
* one byte from the mouse. the keyboard interrupt hands over a mouse byte
23
* it finds in the data port (the i8042 status says which device sent it).
24
*/
25
void
ps2_mouse_byte
(
uint8_t
byte
);
stdint.h
uint8_t
unsigned char uint8_t
Definition
fb.h:18
ps2_mouse_byte
void ps2_mouse_byte(uint8_t byte)
one byte from the mouse.
Definition
ps2_mouse.c:155
ps2_mouse_init
bool ps2_mouse_init(void)
find and turn on a PS/2 mouse.
Definition
ps2_mouse.c:185
src
drivers
mouse
ps2_mouse.h
Generated by
1.18.0