中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當前位置: 首頁 > news >正文

用源代碼做網(wǎng)站2020國內(nèi)十大小說網(wǎng)站排名

用源代碼做網(wǎng)站,2020國內(nèi)十大小說網(wǎng)站排名,網(wǎng)站302怎么做,深圳市創(chuàng)同盟科技有限公司測試內(nèi)核input 事件測試程序。 getevent -lt 命令查看注冊的是是event0/1/2/3/4 中的哪一個。 gcc input_test.c -o input_test 編譯成可執(zhí)行程序。將編譯的input_test,U盤或ADB push到系統(tǒng)里面,chmod 777 input_test 在 ./input_test input_test.c #…

測試內(nèi)核input 事件測試程序。

getevent -lt 命令查看注冊的是是event0/1/2/3/4 中的哪一個。 
gcc input_test.c -o input_test 編譯成可執(zhí)行程序。

將編譯的input_test,U盤或ADB push到系統(tǒng)里面,chmod 777 input_test 在 ./input_test

input_test.c

#include <stdlib.h>
#include <poll.h>
#include <unistd.h>
#include <stddef.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <hcuapi/input.h>
#include <kernel/lib/console.h>#define BUF_SIZE 1024static void print_help(void) {printf("***********************************\n");printf("input test cmds help\n");printf("\tfor example : input_test -i 1\n");printf("\t'i'	1 means event1\n");printf("***********************************\n");
}static int input_test(int argc, char *argv[])
{int fd;struct input_event t;struct pollfd pfd;char input_buf[BUF_SIZE];char *s = "/dev/input/event";long tmp;int x = 0, y = 0, z=0;int event_num = -1;char ch;opterr = 0;optind = 0;while((ch = getopt(argc, argv, "hi:")) != EOF){switch (ch) {case 'h':print_help();return 0;case 'i':tmp = strtoll(optarg, NULL,10);event_num = tmp;break;default:printf("Invalid parameter %c\r\n", ch);print_help();return -1;}}if(event_num == -1){print_help();return -1;}sprintf(input_buf,"/dev/input/event%d",event_num);fd = open(input_buf, O_RDONLY);pfd.fd = fd;pfd.events = POLLIN | POLLRDNORM;if(fd < 0){printf("can't open %s\n",input_buf);return -1;}while (1) {if (poll(&pfd, 1, -1) <= 0)continue;if (read(fd, &t, sizeof(t)) != sizeof(t))continue;printf("type:%d, code:%d, value:%ld\n", t.type, t.code, t.value);if (t.type == EV_KEY) {printf("key %d %s\n", t.code,(t.value) ? "Pressed" : "Released");if (t.code == KEY_POWER && !t.value) {while (read(fd, &t, sizeof(t)) == sizeof(t));break;}}else{if (t.type == EV_ABS){if (t.type == EV_ABS&& t.code == ABS_X) {x = t.value;}if (t.type == EV_ABS && t.code == ABS_Y) {y = t.value;}if (t.type == EV_ABS && t.code == ABS_Z) {z = t.value;}}if (t.type == EV_SYN) {printf("(%4d %4d %4d)\n",x,y,z);}}}close(fd);return 0;
}CONSOLE_CMD(input, NULL, input_test, CONSOLE_CMD_MODE_SELF, "input test, press power to exit test")
http://www.risenshineclean.com/news/46852.html

相關文章:

  • 什么是門戶網(wǎng)站廣告我想自己建立一個網(wǎng)站
  • 動畫畢業(yè)設計代做網(wǎng)站鄭州百度網(wǎng)站優(yōu)化排名
  • 圖片類網(wǎng)站建設百度推廣年費多少錢
  • 搜索引擎網(wǎng)站有哪些windows優(yōu)化大師是哪個公司的
  • 電子商務網(wǎng)站建設問題百度游戲app下載
  • 怎么用視頻做網(wǎng)站背景重慶seo優(yōu)化公司
  • 東營做網(wǎng)站優(yōu)化的公司軟文廣告案例
  • 杭州網(wǎng)站建設公司官網(wǎng)頁面設計漂亮的網(wǎng)站
  • 武漢單位做網(wǎng)站網(wǎng)站建設優(yōu)化400報價
  • wordpress使用手機號登錄上海網(wǎng)站seoseodian
  • 現(xiàn)在建一個網(wǎng)站一年費用只要幾百元南寧百度首頁優(yōu)化
  • 金華市網(wǎng)站建設seo網(wǎng)絡推廣方法
  • 手機網(wǎng)站如何制作免費百度云網(wǎng)盤資源分享網(wǎng)站
  • 一屏展示網(wǎng)站咸寧網(wǎng)站seo
  • 真正永久免費網(wǎng)絡電話seo搜索引擎優(yōu)化原理
  • 網(wǎng)站開發(fā)教程 模板媒體公關
  • 不良網(wǎng)站代碼怎么查行者seo無敵
  • 網(wǎng)站關鍵詞優(yōu)化到首頁難度專業(yè)軟文發(fā)稿平臺
  • 柯基寧波seo企業(yè)網(wǎng)絡推廣
  • 網(wǎng)站建立于網(wǎng)頁設計搜索引擎的優(yōu)化和推廣
  • 網(wǎng)站圖片滾動是怎么做的seo是做什么工作內(nèi)容
  • 建設網(wǎng)站目的及功能定位百度收錄規(guī)則2022
  • dedecms手機網(wǎng)站插件網(wǎng)絡營銷方案策劃論文
  • 延吉最好的網(wǎng)站建設公司張家界百度seo
  • 貴州網(wǎng)站開發(fā)公司seo培訓優(yōu)化課程
  • logo設計公司怎么去跟客戶談山西搜索引擎優(yōu)化
  • 網(wǎng)站建設優(yōu)化一年賺幾十萬seo搜索引擎優(yōu)化軟件
  • 網(wǎng)頁布局設計的一般步驟seo全網(wǎng)優(yōu)化推廣
  • 幾十元做網(wǎng)站濰坊快速網(wǎng)站排名
  • 網(wǎng)站設置黑白色快速建站哪個平臺好