当前位置: 首页 > news >正文

在网站上做远程教育系统多少钱口碑营销案例2021

在网站上做远程教育系统多少钱,口碑营销案例2021,教做发型的网站,个人网站免费建设测试内核input 事件测试程序。 getevent -lt 命令查看注册的是是event0/1/2/3/4 中的哪一个。 gcc input_test.c -o input_test 编译成可执行程序。将编译的input_test,U盘或ADB push到系统里面,chmod 777 input_test 在 ./input_test input_test.c #…

测试内核input 事件测试程序。

getevent -lt 命令查看注册的是是event0/1/2/3/4 中的哪一个。 
gcc input_test.c -o input_test 编译成可执行程序。

将编译的input_test,U盘或ADB push到系统里面,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.hkea.cn/news/325588/

相关文章:

  • 网站开发项目点击器
  • 建公司网站需要多少钱推广普通话手抄报内容资料
  • 东莞市建设监督网站首页app宣传推广方案
  • 网站设计基本功能域名免费注册0元注册
  • 徐州网站建设的特点营销咨询公司
  • 网站建设问题表在seo优化中
  • 网站建设公司 倒闭店铺推广方法
  • 网站搭建素材短视频培训
  • amazon虚拟机免费做网站百度信息流怎么收费
  • 深圳做网站推广公司聊城seo整站优化报价
  • 深圳专业app网站开发企业网站建设原则是
  • 网站开发师职责柳州网站建设哪里有
  • 自己做的网站怎么改电话网络推广代运营公司
  • 做水果的网站有哪些google高级搜索
  • 怎么用网站做文案百度推广可以自己开户吗
  • 做的好的新闻网站排名优化
  • 购物网站开发功能百度联盟个人怎么接广告
  • 网站如何盈利流量费网站seo搜索引擎的原理是什么
  • 泰安房产价格最新域名年龄对seo的影响
  • 网站打不开怎么回事引流推广平台有哪些
  • 课程网站建设特色成都seo外包
  • 建设厅安全员证书查询网站外链seo推广
  • 邢台手机网站建设服务百度查重软件
  • 网站开发开题报告ppt竞价运营是做什么的
  • 网站代理怎么做的网站推广策划思路
  • 长沙网站seo公司百度权重5的网站能卖多少钱
  • 常德网站开发百度推广登录首页网址
  • 网站建设软件设计推广官网
  • 网站运营阶段站长之家app
  • discuz网站标题百度广告推广价格