kernel/inc/drivers/ps2/controller.h

22 lines
735 B
C

// This file is part of noxos and licensed under the MIT open source license
#ifndef NOX_CONTROLLER_H
#define NOX_CONTROLLER_H
#include "utils/stdtypes.h"
#define PS2_CONTROLLER_DATA_PORT 0x60
#define PS2_CONTROLLER_STATUS_PORT 0x64
#define PS2_CONTROLLER_COMMAND_PORT 0x64
#define PS2_CONTROLLER_TIMEOUT 0xFFFFFF
void ps2_controller_init ();
uint8_t ps2_controller_command (uint8_t command);
uint8_t ps2_controller_command_with_data (uint8_t command, uint8_t data);
bool ps2_controller_wait_until_ready_for_input ();
bool ps2_controller_wait_until_ready_for_output ();
uint8_t ps2_controller_read_data ();
#endif //NOX_CONTROLLER_H