Files
2026-07-16 16:09:12 -05:00

30 lines
564 B
C

#ifndef KPS2_H
#define KPS2_H
#define PS2_DATA 0x60
#define PS2_STATUS 0x64
#define PS2_COMMAND 0x64
#define CMD_DISABLE_P1 0xAD
#define CMD_DISABLE_P2 0xAE
#define CMD_READ_CCB 0x20
#define CMD_WRITE_CCB 0x60
#define CMD_SELF_TEST 0xAA
#define CMD_TEST_P1 0xAB
#define CMD_ENABLE_P1 0xAE
#define SELF_TEST_SUCCESS 0x55
#define PORT_TEST_SUCCESS 0x00
#ifndef __ASSEMBLER__
#include <stdint.h>
#include <vfs.h>
int init_ps2();
void ps2_init_kbd(vfs_node_t* dev);
uint8_t ps2_read_data();
char ps2_get_ascii(uint8_t scancode);
#endif
#endif