|
PatchworkOS
|
PS/2 Mouse Driver. More...
Data Structures | |
| struct | ps2_mouse_packet_t |
| PS/2 mouse packet structure. More... | |
| struct | ps2_mouse_irq_context_t |
| PS/2 mouse IRQ context. More... | |
Enumerations | |
| enum | ps2_mouse_packet_flags_t { PS2_PACKET_BUTTON_LEFT = (1 << 0) , PS2_PACKET_BUTTON_RIGHT = (1 << 1) , PS2_PACKET_BUTTON_MIDDLE = (1 << 2) , PS2_PACKET_ALWAYS_ONE = (1 << 3) , PS2_PACKET_X_SIGN = (1 << 4) , PS2_PACKET_Y_SIGN = (1 << 5) , PS2_PACKET_X_OVERFLOW = (1 << 6) , PS2_PACKET_Y_OVERFLOW = (1 << 7) } |
| PS/2 mouse packet flags. More... | |
| enum | ps2_mouse_packet_index_t { PS2_PACKET_FLAGS = 0 , PS2_PACKET_DELTA_X = 1 , PS2_PACKET_DELTA_Y = 2 } |
| PS/2 mouse packet index. More... | |
| enum | ps2_mouse_packet_flags_t { PS2_PACKET_BUTTON_LEFT = (1 << 0) , PS2_PACKET_BUTTON_RIGHT = (1 << 1) , PS2_PACKET_BUTTON_MIDDLE = (1 << 2) , PS2_PACKET_ALWAYS_ONE = (1 << 3) , PS2_PACKET_X_SIGN = (1 << 4) , PS2_PACKET_Y_SIGN = (1 << 5) , PS2_PACKET_X_OVERFLOW = (1 << 6) , PS2_PACKET_Y_OVERFLOW = (1 << 7) } |
| PS/2 mouse packet flags. More... | |
| enum | ps2_mouse_packet_index_t { PS2_PACKET_FLAGS = 0 , PS2_PACKET_DELTA_X = 1 , PS2_PACKET_DELTA_Y = 2 } |
| PS/2 mouse packet index. More... | |
Functions | |
| uint64_t | ps2_mouse_init (ps2_device_info_t *info) |
| Initialize a PS/2 mouse device. | |
PS/2 Mouse Driver.
TODO: Implement scrolling and buttons 4 and 5.
PS/2 mouse packet flags.
| Enumerator | |
|---|---|
| PS2_PACKET_BUTTON_LEFT | |
| PS2_PACKET_BUTTON_RIGHT | |
| PS2_PACKET_BUTTON_MIDDLE | |
| PS2_PACKET_ALWAYS_ONE | |
| PS2_PACKET_X_SIGN | |
| PS2_PACKET_Y_SIGN | |
| PS2_PACKET_X_OVERFLOW | |
| PS2_PACKET_Y_OVERFLOW | |
Definition at line 18 of file ps2_mouse.h.
PS/2 mouse packet flags.
| Enumerator | |
|---|---|
| PS2_PACKET_BUTTON_LEFT | |
| PS2_PACKET_BUTTON_RIGHT | |
| PS2_PACKET_BUTTON_MIDDLE | |
| PS2_PACKET_ALWAYS_ONE | |
| PS2_PACKET_X_SIGN | |
| PS2_PACKET_Y_SIGN | |
| PS2_PACKET_X_OVERFLOW | |
| PS2_PACKET_Y_OVERFLOW | |
Definition at line 18 of file ps2_mouse.h.
PS/2 mouse packet index.
Specifies which member is the next byte to be received.
| Enumerator | |
|---|---|
| PS2_PACKET_FLAGS | |
| PS2_PACKET_DELTA_X | |
| PS2_PACKET_DELTA_Y | |
Definition at line 47 of file ps2_mouse.h.
PS/2 mouse packet index.
Specifies which member is the next byte to be received.
| Enumerator | |
|---|---|
| PS2_PACKET_FLAGS | |
| PS2_PACKET_DELTA_X | |
| PS2_PACKET_DELTA_Y | |
Definition at line 47 of file ps2_mouse.h.
| uint64_t ps2_mouse_init | ( | ps2_device_info_t * | info | ) |
Initialize a PS/2 mouse device.
| info | Device information structure |
Definition at line 86 of file ps2_mouse.c.
References ERR, free(), ps2_mouse_irq_context_t::index, info, irq_install(), IRQ_PS2_FIRST_DEVICE, IRQ_PS2_SECOND_DEVICE, LOG_ERR, malloc(), mouse, mouse_free(), mouse_new(), fb_info_t::name, NULL, PS2_DEV_CMD, PS2_DEV_CMD_SET_DEFAULTS, PS2_DEV_FIRST, and ps2_mouse_irq().
Referenced by ps2_device_init().