?? testmatrixbutton.c~
字號(hào):
#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include "btnIO.h"int main(){ int fd=-1; unsigned char positon[2]={0}; unsigned char ch=0; fd=open("/dev/matrix_button",O_RDWR); if(fd<0) { printf("open matrix_button failure\n"); return fd; } else { printf("open matrix_button successfully\n"); } while(1) { //read(fd,&ch,1); ch = btnRead(fd); /* if( positon[0] && (positon[0] & ~0x80) ) { printf("position(%x,%x)\n",positon[0],positon[1]); } */ printf("button :::%c\n",ch); ch=0; //sleep(1); } close(fd); printf("close matrix_button successfully\n"); return 0;}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -