发布时间: 2012-06-20 20:37:21 作者: rapoo
DM6446之GPIO中断
应用程序如下所示。#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <sys/ioctl.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h> #include <sys/select.h>#include <sys/time.h> #include <errno.h> /int main(void){ int fd,key_value,ret; fd=open("/dev/key",0); if(fd<0){ perror("open /dev/key error!\n"); exit(1); } printf("open /dev/key sucessfully!\n"); while(1){ ret=read(fd,&key_value,sizeof(key_value)); printf("In main(),key_value is '%d'\n\n",key_value); } close(fd); return 0;}
拾零落记:对一些使用过的软件的看法和
点滴搜集-Editplus V3/UE V15工具及其
比较工具三注册码
Beyond Compare 3 许可证密钥已被撤销
季置业涉嫌金螳螂案为何值得反思
地方版“四万亿”是饮鸩解渴
Java堆内存(heap memory)的十个要领
区域卫生信息平台发展的一种战略抉择与
经济学十大原理(6)市场通常是组织经