您好,欢迎光临本网站![请登录][注册会员]  
文件名称: ec11驱动源码
  所属分类: 其它
  开发工具:
  文件大小: 27kb
  下载次数: 0
  上传时间: 2019-04-22
  提 供 者: gouq*****
 详细说明: 在 gpio-keyc的基础上改写的旋转按钮 ec11的驱动,已经经过了测试。可自定义左旋和右旋的键值。如果按键值输入是第三个引脚,也支持按键操作 补存的头文件: gpio_ec11.h #ifndef _GPIO_EC11_H #define _GPIO_EC11_H struct device; struct gpio_desc; /** * struct gpio_ec11_button - configuration parameters * leftcode: ec11 left direction input event code (KEY_*, SW_*) * rightcode: ec11 right direction in put event code (KEY_*, SW_*) * gpio: %-1 if this key does not support gpio * gpio: %-1 if this key does not support gpio * active_low: %true indicates that button is considered * depressed when gpio is low * desc: label that will be attached to buttons gpio * type: input event type (%EV_KEY, %EV_SW, %EV_ABS) * wakeup: configure the button as a wake-up source * debounce_interval: debounce ticks interval in msecs * can_disable: %true indicates that userspace is allowed to * disable button via sysfs * value: axis value for %EV_ABS * irq: Irq number in case of interrupt keys * gpiod: GPIO descriptor */ struct gpio_ec11_button { unsigned int code; unsigned int leftcode; /*记录左旋键值*/ unsigned int rightcode; /*记录右旋键值*/ int gpio; /*旋转编码器A引脚的gpio号*/ int subgpio; /*旋转编码器B引脚的gpio号*/ int active_low; const char *desc; unsigned int type; int wakeup; int debounce_interval; bool can_disable; int value; unsigned int irq; unsigned int irq_flags; struct gpio_desc *gpiod; }; /** * struct gpio_ec11_platform_data - platform data for gpio_ec11 driver * buttons: pointer to array of &gpio;_keys_button structures * describing buttons attached to the device * nbuttons: number of elements in buttons array * poll_interval: polling interval in msecs - for polling driver only * rep: enable input subsystem auto repeat * enable: platform hook for enabling the device * disable: platform hook for disabling the device * name: input device name */ struct gpio_ec11_platform_data { struct gpio_ec11_button *buttons; int nbuttons; unsigned int poll_interval; unsigned int rep:1; int (*enable)(struct device *dev); void (*disable)(struct device *dev); const char *name; }; #endif
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索:
 输入关键字,在本站1000多万海量源码库中尽情搜索: