📄 keypad.c
字号:
#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <sys/ioctl.h>int main() { int fd, i = 0; int tmp; char data; do { usleep(10000); fd = open("/dev/atop_keypad", O_RDWR | O_SYNC); } while (fd < 0);// while(1) { read(fd, &data, 1); printf("%x\n", data);#if 0 if (data == ) { } if (data == ) { } if (data == ) { } if (data == ) { }#endif data = 0xab; write(fd, &data, 1); close(fd); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -