OurOS 0.1
Operating System built by McGill Students
 
Loading...
Searching...
No Matches
ps2_keyboard.h
Go to the documentation of this file.
1/**
2 * @file ps2_keyboard.h
3 * @brief HAL driver for ps2 keyboards
4 *
5 * While ps2 keyboards are rarely seen ever in the real world, the interface still
6 * exists and the bootloader, rather than using the ps2 port directly, connects it directly to your system keyboard
7 * This gives us an easy way to interact with the keyboard without implementingUSB drivers.
8 *
9 * @see https://wiki.osdev.org/PS/2_Keyboard
10 * @see keyboard.h
11 */
12#ifndef _HAL_PS2_KEYBOARD_H
13#define _HAL_PS2_KEYBOARD_H
14
15#include <stdbool.h>
16
17/** The low-level port/register where data is sent to/from the ps2_keyboard" */
18#define PS2_KEYBOARD_DATA_PORT 0x60
19/** The low-level port/register where the ps2_keyboard writes its status */
20#define PS2_KEYBOARD_STATUS_PORT 0x64
21
22/**
23 * @brief poll the ps/2 keyboard for data
24 * @return true if data was pushed to the event queue
25 *
26 * If there is data available, it is pushed to the kernel's keyboard event queue.
27 * @see keyboard.h
28 */
29bool ps2_poll(void);
30
31#endif
bool ps2_poll(void)
poll the ps/2 keyboard for data
Definition ps2_keyboard.c:237