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

相关文章

MybatisGenerator文件生成不出对应文件的问题

《MybatisGenerator文件生成不出对应文件的问题》本文介绍了使用MybatisGenerator生成文件时遇到的问题及解决方法,主要步骤包括检查目标表是否存在、是否能连接到数据库、配置生成... 目录MyBATisGenerator 文件生成不出对应文件先在项目结构里引入“targetProje

C#使用HttpClient进行Post请求出现超时问题的解决及优化

《C#使用HttpClient进行Post请求出现超时问题的解决及优化》最近我的控制台程序发现有时候总是出现请求超时等问题,通常好几分钟最多只有3-4个请求,在使用apipost发现并发10个5分钟也... 目录优化结论单例HttpClient连接池耗尽和并发并发异步最终优化后优化结论我直接上优化结论吧,

Java内存泄漏问题的排查、优化与最佳实践

《Java内存泄漏问题的排查、优化与最佳实践》在Java开发中,内存泄漏是一个常见且令人头疼的问题,内存泄漏指的是程序在运行过程中,已经不再使用的对象没有被及时释放,从而导致内存占用不断增加,最终... 目录引言1. 什么是内存泄漏?常见的内存泄漏情况2. 如何排查 Java 中的内存泄漏?2.1 使用 J

numpy求解线性代数相关问题

《numpy求解线性代数相关问题》本文主要介绍了numpy求解线性代数相关问题,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧... 在numpy中有numpy.array类型和numpy.mat类型,前者是数组类型,后者是矩阵类型。数组

解决systemctl reload nginx重启Nginx服务报错:Job for nginx.service invalid问题

《解决systemctlreloadnginx重启Nginx服务报错:Jobfornginx.serviceinvalid问题》文章描述了通过`systemctlstatusnginx.se... 目录systemctl reload nginx重启Nginx服务报错:Job for nginx.javas

Redis缓存问题与缓存更新机制详解

《Redis缓存问题与缓存更新机制详解》本文主要介绍了缓存问题及其解决方案,包括缓存穿透、缓存击穿、缓存雪崩等问题的成因以及相应的预防和解决方法,同时,还详细探讨了缓存更新机制,包括不同情况下的缓存更... 目录一、缓存问题1.1 缓存穿透1.1.1 问题来源1.1.2 解决方案1.2 缓存击穿1.2.1

vue解决子组件样式覆盖问题scoped deep

《vue解决子组件样式覆盖问题scopeddeep》文章主要介绍了在Vue项目中处理全局样式和局部样式的方法,包括使用scoped属性和深度选择器(/deep/)来覆盖子组件的样式,作者建议所有组件... 目录前言scoped分析deep分析使用总结所有组件必须加scoped父组件覆盖子组件使用deep前言

解决Cron定时任务中Pytest脚本无法发送邮件的问题

《解决Cron定时任务中Pytest脚本无法发送邮件的问题》文章探讨解决在Cron定时任务中运行Pytest脚本时邮件发送失败的问题,先优化环境变量,再检查Pytest邮件配置,接着配置文件确保SMT... 目录引言1. 环境变量优化:确保Cron任务可以正确执行解决方案:1.1. 创建一个脚本1.2. 修

Python 标准库time时间的访问和转换问题小结

《Python标准库time时间的访问和转换问题小结》time模块为Python提供了处理时间和日期的多种功能,适用于多种与时间相关的场景,包括获取当前时间、格式化时间、暂停程序执行、计算程序运行时... 目录模块介绍使用场景主要类主要函数 - time()- sleep()- localtime()- g

SpringBoot项目删除Bean或者不加载Bean的问题解决

《SpringBoot项目删除Bean或者不加载Bean的问题解决》文章介绍了在SpringBoot项目中如何使用@ComponentScan注解和自定义过滤器实现不加载某些Bean的方法,本文通过实... 使用@ComponentScan注解中的@ComponentScan.Filter标记不加载。@C