建设银行网站怎么预约纪念币,口碑的经典句子,acfun网站设计改进,综合办公oa系统篇头
全志H713 Soc是一颗 A53四核心#xff0c;支持MAX 2GB DDR#xff0c; 支持1920x1080P LVDS接口#xff0c; 支持梯形校正功能的芯片#xff0c;非常适合用于开发投影仪#xff0c;尤其是低成本的LCD投影。本文详细介绍此平台#xff0c;配置一个新的红外遥控器的方…篇头
全志H713 Soc是一颗 A53四核心支持MAX 2GB DDR 支持1920x1080P LVDS接口 支持梯形校正功能的芯片非常适合用于开发投影仪尤其是低成本的LCD投影。本文详细介绍此平台配置一个新的红外遥控器的方法。
一、遥控器规格
先拿到遥控器的规格书获取用户码头码及其他按键的硬件码值确认IR的红外协议此案例IR为NEC协议 二、NEC IR 配置方法
2.1 驱动开启NEC协议
全志H713已默认开启NEC IR驱动可在menuconfig中查找下图【Remote controller support】配置的位置进入后开启相关IR驱动 2.2 添加key-map文件 根据IR规格书用户码头码为0x807f为例则新建如下文件头码字节序要颠倒一下 vendor\aw\homlet\hardware\input\multi_ir\keylayout\customer_ir_7f80.kl 如下根据IR规格填写键值映射关系
key 6 BACK
key 4 MENU
key 8 DPAD_CENTER
key 27 DPAD_DOWN
key 5 DPAD_UP
key 1 HOME
key 7 DPAD_LEFT
key 9 DPAD_RIGHT
key 12 VOLUME_UP
key 14 VOLUME_DOWN
key 18 POWER
key 61 TV_INPUT
2.3 将.kl文件追加到编译系统
编辑 aw/homlet/hardware/input/multi_ir/multiir.mk
diff --git a/vendor/aw/homlet/hardware/input/multi_ir/multiir.mk b/vendor/aw/homlet/hardware/input/multi_ir/multiir.mk
index 9e700162ab..5aefa94f73 100644
--- a/vendor/aw/homlet/hardware/input/multi_ir/multiir.mkb/vendor/aw/homlet/hardware/input/multi_ir/multiir.mk-13,6 13,7 BASE_KL_COPY_LIST : virtual-remote.kl \customer_rc5_ir_04.kl \BASE_KL_COPY_LIST customer_ir_9f00.kl \customer_ir_7f80.kl \ ###--- 添加自己的.kl到这里customer_ir_dd22.kl \customer_ir_fb04.kl \customer_ir_ff00.kl \2.4 配置dts
此处配置主要影响到待机后的电源键的响应需分别配置borad.dts和uboot-board.dtslongan\device\config\chips\h713\configs\tuna_p3\linux-5.4\board.dtslongan\device\config\chips\h713\configs\tuna_p3\uboot-board.dts如下图添加DC ON按键其中ir_addr为IR用户码头码 1board.dts
diff --git a/longan/device/config/chips/h713/configs/tuna_p3/linux-5.4/board.dts b/longan/device/config/chips/h713/configs/tuna_p3/linux-5.4/board.dts
index af9d8b7e2f..38baa35c8f 100755
--- a/longan/device/config/chips/h713/configs/tuna_p3/linux-5.4/board.dtsb/longan/device/config/chips/h713/configs/tuna_p3/linux-5.4/board.dts-62,7 62,7 gpio_group PL;gpio_pin 9;gpio_function 3;
- count 14;count 15; #### -- 1. 增加1个按键的count数ir_power_key_code0 0x40;ir_addr_code0 0xfe01;ir_power_key_code1 0x1a;-91,6 91,8 ir_addr_code12 0xfb04;ir_power_key_code13 0x42;ir_addr_code13 0xbf00;ir_power_key_code14 0x12; #### -- 2. 增加客制化的电源按键HW按键值ir_addr_code14 0x7f80; #### -- 3. 增加客制化IR的用户头码注意字节序颠倒};2uboot-board.dts 同理修改此文件
diff --git a/longan/device/config/chips/h713/configs/tuna_p3/uboot-board.dts b/longan/device/config/chips/h713/configs/tuna_p3/uboot-board.dts
index d166e3fa05..71adc28d51 100644
--- a/longan/device/config/chips/h713/configs/tuna_p3/uboot-board.dtsb/longan/device/config/chips/h713/configs/tuna_p3/uboot-board.dts-62,7 62,7 gpio_group PL;gpio_pin 9;gpio_function 3;
- count 14;count 15; ir_power_key_code0 0x40; -73,7 73,7 ir_power_key_code13 0x42;ir_addr_code13 0xbf00;ir_power_key_code14 0x12;ir_addr_code14 0x7f80;};};三、其他IR协议
以customer_rc5_ir_04.kl举例将对应的协议名称追加在文件名中即可其余与NEC配置方法相同
四、附录
4.1 头码配置无效
规格所写头码为0x807f系统无法识别将出现下面的现象getevent 命令显示按键无效所有按键皆为0000
console:/ # getevent /dev/input/event1: 0004 0004 017f801b
/dev/input/event1: 0000 0000 00000000
/dev/input/event1: 0004 0004 007f801b
/dev/input/event1: 0000 0000 000000004.2 头码配置有效
将头码的字节序做一下颠倒变为0x7f80按键生效的打印情况
console:/ # getevent
add device 1: /dev/input/event4name: soc2900000:gpio_keys
add device 2: /dev/input/event3name: sunxi-ir-uinput
add device 3: /dev/input/event0name: sunxi-gpadc0
add device 4: /dev/input/event1name: sunxi-ir
add device 5: /dev/input/event2name: audiocodec sunxi Audio Jack1上
/dev/input/event3: 0001 0013 00000001
/dev/input/event1: 0004 0004 017f8005 ###### 数据分解 01-7f80-05 ,0x05为 UP key
/dev/input/event3: 0000 0000 00000000
/dev/input/event1: 0000 0000 00000000/dev/input/event3: 0001 0013 00000000
/dev/input/event1: 0004 0004 007f8005
/dev/input/event3: 0000 0000 00000000
/dev/input/event1: 0000 0000 000000002下
/dev/input/event1: 0004 0004 017f801b ###### 数据分解 01-7f80-1b ,0x1b为 DOWN key
/dev/input/event3: 0001 0014 00000001
/dev/input/event1: 0000 0000 00000000
/dev/input/event3: 0000 0000 00000000
/dev/input/event3: 0001 0014 00000000
/dev/input/event1: 0000 0000 00000000
/dev/input/event3: 0000 0000 000000003左
/dev/input/event1: 0004 0004 017f8007
/dev/input/event3: 0001 0015 00000001
/dev/input/event1: 0000 0000 00000000
/dev/input/event3: 0000 0000 00000000/dev/input/event1: 0004 0004 007f8007
/dev/input/event1: 0000 0000 00000000
/dev/input/event3: 0001 0015 00000000
/dev/input/event3: 0000 0000 000000004右
/dev/input/event1: 0004 0004 017f8009
/dev/input/event3: 0001 0016 00000001
/dev/input/event1: 0000 0000 00000000
/dev/input/event3: 0000 0000 00000000/dev/input/event1: 0004 0004 007f8009
/dev/input/event3: 0001 0016 00000000
/dev/input/event1: 0000 0000 00000000
/dev/input/event3: 0000 0000 000000005关机
/dev/input/event1: 0004 0004 017f8012
/dev/input/event3: 0001 0074 00000001
/dev/input/event1: 0000 0000 00000000
/dev/input/event3: 0000 0000 00000000
/dev/input/event1: 0004 0004 007f8012
/dev/input/event3: 0001 0074 00000000
/dev/input/event1: 0000 0000 00000000
/dev/input/event3: 0000 0000 000000004.3 dumpsys input
130|console:/ # dumpsys input
INPUT MANAGER (dumpsys input)Input Manager State:Interactive: trueSystem UI Visibility: 0x8008Pointer Speed: 0Pointer Gestures Enabled: trueShow Touches: falsePointer Capture Enabled: falseEvent Hub State:BuiltInKeyboardId: -2Devices:-1: VirtualClasses: 0x40000023Path: virtualEnabled: trueDescriptor: a718a782d34bc767f4689c232d64d527998ea7fdLocation: ControllerNumber: 0UniqueId: virtualIdentifier: bus0x0000, vendor0x0000, product0x0000, version0x0000KeyLayoutFile: /system/usr/keylayout/Generic.klKeyCharacterMapFile: /system/usr/keychars/Virtual.kcmConfigurationFile: HaveKeyboardLayoutOverlay: falseVideoDevice: none1: sunxi-ir-uinputClasses: 0x0000002bPath: /dev/input/event3Enabled: trueDescriptor: 0a253e777d1b2169367be63d7c9054e7991953a6Location: ControllerNumber: 0UniqueId: Identifier: bus0x0019, vendor0x0000, product0x0000, version0x0004KeyLayoutFile: /vendor/usr/keylayout/sunxi-ir-uinput.klKeyCharacterMapFile: /system/usr/keychars/Generic.kcmConfigurationFile: HaveKeyboardLayoutOverlay: falseVideoDevice: none2: sunxi-irClasses: 0x00000001Path: /dev/input/event1Enabled: trueDescriptor: 485d69228e24f5e46da1598745890b214130dbc4Location: sunxi-ir/input0ControllerNumber: 0UniqueId: Identifier: bus0x0019, vendor0x0001, product0x0001, version0x0100KeyLayoutFile: /vendor/usr/keylayout/sunxi-ir.klKeyCharacterMapFile: /system/usr/keychars/Generic.kcmConfigurationFile: HaveKeyboardLayoutOverlay: falseVideoDevice: none4: audiocodec sunxi Audio JackClasses: 0x00000081Path: /dev/input/event2Enabled: trueDescriptor: d6a59aa863179ab43a39346203ca02f7639be982Location: ALSAControllerNumber: 0UniqueId: Identifier: bus0x0000, vendor0x0000, product0x0000, version0x0000KeyLayoutFile: /system/usr/keylayout/Generic.klKeyCharacterMapFile: /system/usr/keychars/Generic.kcmConfigurationFile: HaveKeyboardLayoutOverlay: falseVideoDevice: none5: soc2900000:gpio_keysClasses: 0x00000001Path: /dev/input/event4Enabled: trueDescriptor: d2c52ff0f656fac4cd7b7a118d575e0109a9fe1cLocation: gpio-keys/input0ControllerNumber: 0UniqueId: Identifier: bus0x0019, vendor0x0001, product0x0001, version0x0100KeyLayoutFile: /system/usr/keylayout/Generic.klKeyCharacterMapFile: /system/usr/keychars/Generic.kcmConfigurationFile: HaveKeyboardLayoutOverlay: falseVideoDevice: noneUnattached video devices:none