X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/a5338b60e111972364a8bc6f07011c6defd213d2..45e1f8b055043e54be35462852ab6649d634da7c:/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..9a246ea 100644 --- a/lunaix-os/includes/lunaix/peripheral/ps2kbd.h +++ b/lunaix-os/includes/lunaix/peripheral/ps2kbd.h @@ -44,7 +44,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 +69,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 +77,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 +88,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 +100,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);