main.c

来自「ps2 pc 键盘 o」· C语言 代码 · 共 20 行

C
20
字号
#include <reg51.h>

extern void ProcessPS2(void); 
extern void PS2Init(void);
 
void main(void) 
{ 
        //往PC上发按键使用OnPS2SendChar(); 
        //OnPS2SendChar(0x15);//Q//发送通码 

        //OnPS2SendChar(0xF0); 
        //OnPS2SendChar(0x15);//Q//发送断码 
        PS2Init(); 
        while(1) 
        { 
                ProcessPS2();//开机应答,使电脑能识别到键盘 
                //other code 
        } 
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?