X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/bc34fd00d2e81fbc890bb2060ed6693454a230bf..7c7b5f05d39b7739d990f71256a2267ec67a6913:/lunaix-os/includes/lunaix/peripheral/ps2kbd.h diff --git a/lunaix-os/includes/lunaix/peripheral/ps2kbd.h b/lunaix-os/includes/lunaix/peripheral/ps2kbd.h index 08a0d56..a6f2c63 100644 --- a/lunaix-os/includes/lunaix/peripheral/ps2kbd.h +++ b/lunaix-os/includes/lunaix/peripheral/ps2kbd.h @@ -1,7 +1,6 @@ #ifndef __LUNAIX_PS2KBD_H #define __LUNAIX_PS2KBD_H -#include #include #include @@ -44,7 +43,6 @@ #define PS2_DELAY 1000 #define PS2_CMD_QUEUE_SIZE 8 -#define PS2_KBD_RECV_BUFFER_SIZE 8 #define PS2_NO_ARG 0xff00 @@ -70,14 +68,6 @@ struct ps2_cmd_queue mutex_t mutex; }; -struct ps2_key_buffer -{ - struct kdb_keyinfo_pkt buffer[PS2_KBD_RECV_BUFFER_SIZE]; - int read_ptr; - int buffered_len; - mutex_t mutex; -}; - /** * @brief 向PS/2控制器的控制端口(0x64)发送指令并等待返回代码。 * 注意,对于没有返回代码的命令请使用`ps2_post_cmd`,否则会造成死锁。 @@ -86,8 +76,8 @@ struct ps2_key_buffer * @param cmd * @param args */ -static uint8_t -ps2_issue_cmd(char cmd, uint16_t arg); +static u8_t +ps2_issue_cmd(char cmd, u16_t arg); /** * @brief 向PS/2控制器的编码器端口(0x60)发送指令并等待返回代码。 @@ -97,8 +87,8 @@ ps2_issue_cmd(char cmd, uint16_t arg); * @param cmd * @param args */ -static uint8_t -ps2_issue_dev_cmd(char cmd, uint16_t arg); +static u8_t +ps2_issue_dev_cmd(char cmd, u16_t arg); /** * @brief 向PS/2控制器发送指令,不等待返回代码。 @@ -109,7 +99,7 @@ ps2_issue_dev_cmd(char cmd, uint16_t arg); * @return char */ static void -ps2_post_cmd(uint8_t port, char cmd, uint16_t arg); +ps2_post_cmd(u8_t port, char cmd, u16_t arg); void ps2_device_post_cmd(char cmd, char arg);