rk3288 外部EINT 中断问题

2024-05-13 19:18
文章标签 问题 中断 外部 rk3288 eint

本文主要是介绍rk3288 外部EINT 中断问题,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

驱动OK

硬件触发方式为稳定的“上升沿触发   ”__| ̄ ̄ " 


2# code

//static irqreturn_t eint_isr1(struct eint_keypad *eint_ddata)
static irqreturn_t eint_isr1(int irq, void *dev_id)
{struct eint_keypad *eint_ddata =  (struct eint_keypad*)dev_id;printk("jiangdou....irq == gpio_one\n");input_event(eint_ddata->input, EV_KEY, EINT_GPIO1, 1);input_sync(eint_ddata->input);input_event(eint_ddata->input, EV_KEY, EINT_GPIO1, 0);input_sync(eint_ddata->input);return 0;}
//static irqreturn_t eint_isr2(struct eint_keypad *eint_ddata)
static irqreturn_t eint_isr2(int irq, void *dev_id)
{struct eint_keypad *eint_ddata =  (struct eint_keypad*)dev_id;printk("jiangdou....irq == gpio_two\n");input_event(eint_ddata->input, EV_KEY, EINT_GPIO2, 1);input_sync(eint_ddata->input);input_event(eint_ddata->input, EV_KEY, EINT_GPIO2, 0);input_sync(eint_ddata->input);return 0;}



root@rk3288:/ # getevent -l
add device 1: /dev/input/event3
  name:     "USB OPTICAL MOUSE "
add device 2: /dev/input/event0
  name:     "eint-gpio.34
"
add device 3: /dev/input/event2
  name:     "rk29-keypad"
add device 4: /dev/input/event1
  name:     "rkxx-remotectl.33"



root@rk3288:/ #


include/uapi/linux/input.h:477:#define EINT_GPIO1         249   /* add by jiangdou */
include/uapi/linux/input.h:478:#define EINT_GPIO2         250   /* add by jiangdou */


4#

/dev/input/event0

事件读取问题,,请参考其他共性问题!!!



5## android

/* add by jiangdou for KEY_F2 into POWERDOWN  20150827. start{{------------ */} else if((keyCode == KeyEvent.KEYCODE_DOU) &&!down){try {Intent intenta = new Intent("android.intent.action.ACTION_REQUEST_SHUTDOWN");intenta.putExtra("android.intent.extra.KEY_CONFIRM", false);intenta.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);mContext.startActivity(intenta);} catch (Exception e) {e.printStackTrace();}/* add by jiangdou for KEY_F2 into POWERDOWN  20150827.  end    ------------}} */vi vi frameworks/base/data/keyboards/Generic.kl# add by jiangdou
key 251  DOU
key 249  GINT1
key 250  GINT2vi vi frameworks/base/data/keyboards/qwerty.kl
# add by jiangdou
#key 59  F1
key 251  DOU
key 249  GINT1
key 250  GINT2
key 63  F5vi frameworks/base/core/res/res/values/attrs.xml<!-- add by jiangdou for IR --><enum name="KEYCODE_DOU" value="251" /><enum name="KEYCODE_GINT1" value="249" /><enum name="KEYCODE_GINT2" value="250" /><enum name="KEYCODE_F1" value="131" />vi frameworks/native/include/android/keycodes.hAKEYCODE_F1              = 131,AKEYCODE_DOU             = 251, /*add by jiangdou for IR*/AKEYCODE_GINT1           = 249, /*add by jiangdou for GINT1*/AKEYCODE_GINT2           = 250, /*add by jiangdou for GINT2*/vi frameworks/base/core/java/android/view/KeyEvent.java/* add by jiangdou for IR */public static final int KEYCODE_DOU             = 251;/* add by jiangdou for GINT1 */public static final int KEYCODE_GINT1           = 249;/* add by jiangdou for GINT2 */public static final int KEYCODE_GINT2           = 250;.....(..)names.append(KEYCODE_F1, "KEYCODE_F1");names.append(KEYCODE_DOU, "KEYCODE_DOU");names.append(KEYCODE_DOU, "KEYCODE_GINT1");names.append(KEYCODE_DOU, "KEYCODE_GINT2");vi frameworks/native/libs/input/Input.cppcase AKEYCODE_DOU:case AKEYCODE_GINT1:case AKEYCODE_GINT2:vi frameworks/base/api/current.txtfield public static final int KEYCODE_F = 34; // 0x22field public static final int KEYCODE_DOU = 251; //add by jiangdou for IRfield public static final int KEYCODE_GINT1 = 249; //add by jiangdou for GINT1field public static final int KEYCODE_GINT2 = 250; //add by jiangdou for GINT2


6###

vi frameworks/native/include/input/KeycodeLabels.h

   // NOTE: If you add a new keycode here you must also add it to several other files.
    //       Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
    {"DOU", 251}, /* add by jiangdou  for IR */
    {"GINTA", 249}, /* add by jiangdou  for GINTA */
    {"GINTB", 250}, /* add by jiangdou  for GINTB */
    { NULL, 0 }
};





6###

  //for test EINTpublic boolean onKeyDown(int keyCode, KeyEvent event){switch (keyCode){case KeyEvent.KEYCODE_TV_INPUT_COMPONENT_1:  //for KEY_GINTA//DisplayToast("RK3288_外部中断_SP1DI,EINT1");Log.e(MainActivity.ACTIVITY_TAG, "RK3288_外部中断_SP1DI,EINT1.............."); break;case KeyEvent.KEYCODE_TV_INPUT_COMPONENT_2:  //for KEY_GINTB//DisplayToast("RK3288_外部中断_SP1DO,EINT2");Log.e(MainActivity.ACTIVITY_TAG, "RK3288_外部中断_SP1DO,EINT2..............");break;            default:break;}return super.onKeyDown(keyCode, event);}


7###xx

12-12 05:54:08.310: V/Zygote(2055): Switching descriptor 34 to /dev/null
12-12 05:54:08.310: V/Zygote(2055): Switching descriptor 11 to /dev/null
12-12 05:54:08.310: D/dalvikvm(2055): Late-enabling CheckJNI
12-12 05:54:08.330: E/jdwp(2055): Failed sending reply to debugger: Broken pipe
12-12 05:54:08.330: D/dalvikvm(2055): Debugger has detached; object registry had 1 entries
12-12 05:54:08.430: I/MaliGPU(2055): mali_so with ver '8@0', built at '15:33:21', on 'Nov 10 2014'.
12-12 05:54:08.440: D/mali_winsys(2055): new_window_surface returns 0x3000
12-12 05:54:08.470: D/OpenGLRenderer(2055): Enabling debug mode 0
12-12 05:54:10.400: D/keymatch(2055): jiangdou rk3288_gpio out high : set gpio236 value:1 
12-12 05:54:10.400: D/keymatch(2055): rk3288gpio_output for set GPIO:236 to value:1
12-12 05:54:11.400: D/keymatch(2055): write rk3288  :/sys/class/gpio/gpio236/value to value:1 fail...
12-12 05:54:11.410: I/Choreographer(2055): Skipped 59 frames!  The application may be doing too much work on its main thread.
12-12 05:54:11.420: E/GpioDemo(2055): RK3288_外部中断_SP1DI,EINT1..............
12-12 05:54:13.110: D/keymatch(2055): jiangdou rk3288_gpio out low : set gpio236 value:0 
12-12 05:54:13.110: D/keymatch(2055): rk3288gpio_output for set GPIO:236 to value:0
12-12 05:54:14.120: D/keymatch(2055): write rk3288  :/sys/class/gpio/gpio236/value to value:0 fail...
12-12 05:54:14.130: I/Choreographer(2055): Skipped 60 frames!  The application may be doing too much work on its main thread.
12-12 05:54:24.030: D/keymatch(2055): jiangdou rk3288_gpio out high : set gpio236 value:1 
12-12 05:54:24.030: D/keymatch(2055): rk3288gpio_output for set GPIO:236 to value:1
12-12 05:54:25.030: D/keymatch(2055): write rk3288  :/sys/class/gpio/gpio236/value to value:1 fail...
12-12 05:54:25.040: I/Choreographer(2055): Skipped 59 frames!  The application may be doing too much work on its main thread.
12-12 05:54:25.050: E/GpioDemo(2055): RK3288_外部中断_SP1DI,EINT1..............
12-12 05:54:26.380: D/keymatch(2055): jiangdou rk3288_gpio out low : set gpio236 value:0 
12-12 05:54:26.380: D/keymatch(2055): rk3288gpio_output for set GPIO:236 to value:0
12-12 05:54:27.380: D/keymatch(2055): write rk3288  :/sys/class/gpio/gpio236/value to value:0 fail...
12-12 05:54:27.400: I/Choreographer(2055): Skipped 60 frames!  The application may be doing too much work on its main thread.
12-12 05:54:29.260: D/keymatch(2055): jiangdou rk3288_gpio out high : set gpio236 value:1 
12-12 05:54:29.260: D/keymatch(2055): rk3288gpio_output for set GPIO:236 to value:1
12-12 05:54:30.270: D/keymatch(2055): write rk3288  :/sys/class/gpio/gpio236/value to value:1 fail...
12-12 05:54:30.270: I/Choreographer(2055): Skipped 60 frames!  The application may be doing too much work on its main thread.
12-12 05:54:30.280: E/GpioDemo(2055): RK3288_外部中断_SP1DI,EINT1..............



xx

RK3288_BOX_SDK问题

root@rk3288:/ # cat /proc/bus/input/devices
cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="ff680000.pwm"
P: Phys=gpio-keys/input11
S: Sysfs=/devices/ff680000.pwm/input/input0
U: Uniq=
H: Handlers=event0 ddr_freq keychord
B: PROP=0
B: EV=3
B: KEY=70010 200000 0 0 0 9000100 2000000 6800000 40008800 1e16c0 0 8000000 10000ffc


I: Bus=0003 Vendor=1a2c Product=2124 Version=0110
N: Name="SEM USB Keyboard"
P: Phys=usb-ff540000.usb-1.3/input0
S: Sysfs=/devices/ff540000.usb/usb3/3-1/3-1.3/3-1.3:1.0/input/input1
U: Uniq=
H: Handlers=sysrq event1 ddr_freq keychord
B: PROP=0
B: EV=120013
B: KEY=10000 7 ff800000 7ff febeffdf f3cfffff ffffffff fffffffe
B: MSC=10
B: LED=7


I: Bus=0003 Vendor=1a2c Product=2124 Version=0110
N: Name="SEM USB Keyboard"
P: Phys=usb-ff540000.usb-1.3/input1
S: Sysfs=/devices/ff540000.usb/usb3/3-1/3-1.3/3-1.3:1.1/input/input2
U: Uniq=
H: Handlers=event2 ddr_freq keychord
B: PROP=0
B: EV=1f
B: KEY=3007f 0 0 0 0 483ffff 17aff32d bf544446 0 0 1 120c13 b17c000 267bfa d941dfed 9e1680 4400 0 10000002
B: REL=40
B: ABS=1 0
B: MSC=10


root@rk3288:/ # getevent -l
getevent -l
add device 1: /dev/input/event2
  name:     "SEM USB Keyboard"
add device 2: /dev/input/event1
  name:     "SEM USB Keyboard"
add device 3: /dev/input/event0
  name:     "ff680000.pwm"
^C
C:\Users\jiangdou>adb shell


vi  frameworks/base/data/keyboards/Vendor_0001_Product_0001.kl    /*  add this file  OK  for IR */





这篇关于rk3288 外部EINT 中断问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/986593

相关文章

SpringBoot启动报错的11个高频问题排查与解决终极指南

《SpringBoot启动报错的11个高频问题排查与解决终极指南》这篇文章主要为大家详细介绍了SpringBoot启动报错的11个高频问题的排查与解决,文中的示例代码讲解详细,感兴趣的小伙伴可以了解一... 目录1. 依赖冲突:NoSuchMethodError 的终极解法2. Bean注入失败:No qu

MySQL新增字段后Java实体未更新的潜在问题与解决方案

《MySQL新增字段后Java实体未更新的潜在问题与解决方案》在Java+MySQL的开发中,我们通常使用ORM框架来映射数据库表与Java对象,但有时候,数据库表结构变更(如新增字段)后,开发人员可... 目录引言1. 问题背景:数据库与 Java 实体不同步1.1 常见场景1.2 示例代码2. 不同操作

如何解决mysql出现Incorrect string value for column ‘表项‘ at row 1错误问题

《如何解决mysql出现Incorrectstringvalueforcolumn‘表项‘atrow1错误问题》:本文主要介绍如何解决mysql出现Incorrectstringv... 目录mysql出现Incorrect string value for column ‘表项‘ at row 1错误报错

如何解决Spring MVC中响应乱码问题

《如何解决SpringMVC中响应乱码问题》:本文主要介绍如何解决SpringMVC中响应乱码问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录Spring MVC最新响应中乱码解决方式以前的解决办法这是比较通用的一种方法总结Spring MVC最新响应中乱码解

pip无法安装osgeo失败的问题解决

《pip无法安装osgeo失败的问题解决》本文主要介绍了pip无法安装osgeo失败的问题解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一... 进入官方提供的扩展包下载网站寻找版本适配的whl文件注意:要选择cp(python版本)和你py

解决Java中基于GeoTools的Shapefile读取乱码的问题

《解决Java中基于GeoTools的Shapefile读取乱码的问题》本文主要讨论了在使用Java编程语言进行地理信息数据解析时遇到的Shapefile属性信息乱码问题,以及根据不同的编码设置进行属... 目录前言1、Shapefile属性字段编码的情况:一、Shp文件常见的字符集编码1、System编码

Spring MVC使用视图解析的问题解读

《SpringMVC使用视图解析的问题解读》:本文主要介绍SpringMVC使用视图解析的问题解读,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录Spring MVC使用视图解析1. 会使用视图解析的情况2. 不会使用视图解析的情况总结Spring MVC使用视图

Redis解决缓存击穿问题的两种方法

《Redis解决缓存击穿问题的两种方法》缓存击穿问题也叫热点Key问题,就是⼀个被高并发访问并且缓存重建业务较复杂的key突然失效了,无数的请求访问会在瞬间给数据库带来巨大的冲击,本文给大家介绍了Re... 目录引言解决办法互斥锁(强一致,性能差)逻辑过期(高可用,性能优)设计逻辑过期时间引言缓存击穿:给

Java程序运行时出现乱码问题的排查与解决方法

《Java程序运行时出现乱码问题的排查与解决方法》本文主要介绍了Java程序运行时出现乱码问题的排查与解决方法,包括检查Java源文件编码、检查编译时的编码设置、检查运行时的编码设置、检查命令提示符的... 目录一、检查 Java 源文件编码二、检查编译时的编码设置三、检查运行时的编码设置四、检查命令提示符

Jackson库进行JSON 序列化时遇到了无限递归(Infinite Recursion)的问题及解决方案

《Jackson库进行JSON序列化时遇到了无限递归(InfiniteRecursion)的问题及解决方案》使用Jackson库进行JSON序列化时遇到了无限递归(InfiniteRecursi... 目录解决方案‌1. 使用 @jsonIgnore 忽略一个方向的引用2. 使用 @JsonManagedR