OurOS 0.1
Operating System built by McGill Students
 
Loading...
Searching...
No Matches
ps2_keyboard.h File Reference

HAL driver for ps2 keyboards. More...

#include <stdbool.h>

Go to the source code of this file.

Macros

#define PS2_KEYBOARD_DATA_PORT   0x60
 
#define PS2_KEYBOARD_STATUS_PORT   0x64
 

Functions

bool ps2_poll (void)
 poll the ps/2 keyboard for data
 

Detailed Description

HAL driver for ps2 keyboards.

While ps2 keyboards are rarely seen ever in the real world, the interface still exists and the bootloader, rather than using the ps2 port directly, connects it directly to your system keyboard This gives us an easy way to interact with the keyboard without implementingUSB drivers.

See also
https://wiki.osdev.org/PS/2_Keyboard
keyboard.h

Macro Definition Documentation

◆ PS2_KEYBOARD_DATA_PORT

#define PS2_KEYBOARD_DATA_PORT   0x60

The low-level port/register where data is sent to/from the ps2_keyboard"

◆ PS2_KEYBOARD_STATUS_PORT

#define PS2_KEYBOARD_STATUS_PORT   0x64

The low-level port/register where the ps2_keyboard writes its status

Function Documentation

◆ ps2_poll()

bool ps2_poll ( void  )

poll the ps/2 keyboard for data

Returns
true if data was pushed to the event queue

If there is data available, it is pushed to the kernel's keyboard event queue.

See also
keyboard.h

poll the ps/2 keyboard for data

Returns
whether or not a event is available