您尚未登录。

楼主 #1 2018-09-25 21:06:08

szyusong
会员
所在地: 深圳
注册时间: 2018-09-08
已发帖子: 35
积分: 35

荔枝派nano的按键能用吗?

采用 3.10 内核。按原理图修改了 dts 中的配置:

	   	keyboard0:keyboard{
			compatible = "allwinner,keyboard_2000mv";
			reg = <0x0 0x01c23400 0x0 0x400>;
			interrupts = <22>;
			status = "okay";
			key_cnt = <4>;
			key1 = <200 115>;
			key2 = <400 114>;
			key3 = <600 139>;
			key4 = <800 28>;
		};

打开调试,按几个键,发现在 sunxi_isr_key 中调用 sunxi_keyboard_read_data 获取的 ADC 值都是 0 或 1,和按键的 ADC 值对不上。

最近编辑记录 szyusong (2018-09-25 21:06:22)

离线

#2 2018-09-25 21:22:21

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: 荔枝派nano的按键能用吗?

这个我明天也试一试。





离线

楼主 #3 2018-09-25 22:41:24

szyusong
会员
所在地: 深圳
注册时间: 2018-09-08
已发帖子: 35
积分: 35

Re: 荔枝派nano的按键能用吗?

没问题了,板子虚焊了。

[   13.881607] key down
[   13.895040] report data: key_val :      26 transfer_code:      255 , scancode:        4
[   13.921882] report data: key_val :      25 transfer_code:        4 , scancode:        3
[   13.948704] report data: key_val :      25 transfer_code:        3 , scancode:        3
[   14.002270] report data: key_val :      26 transfer_code:        3 , scancode:        4
[   14.029113] report data: key_val :      63 transfer_code:        4 
[   14.036106] key up 
[   14.898467] key down
[   14.911895] report data: key_val :      20 transfer_code:      255 , scancode:        3
[   14.938726] report data: key_val :      20 transfer_code:        3 , scancode:        3
[   14.965560] report data: key_val :      20 transfer_code:        3 , scancode:        3
[   14.992430] report data: key_val :      20 transfer_code:        3 , scancode:        3
[   15.019221] report data: key_val :      20 transfer_code:        3 , scancode:        3
[   15.046092] report data: key_val :      63 transfer_code:        3 
[   15.053174] key up 
[   16.303534] key down
[   16.316968] report data: key_val :      14 transfer_code:      255 , scancode:        2
[   16.343824] report data: key_val :      14 transfer_code:        2 , scancode:        2
[   16.370668] report data: key_val :      14 transfer_code:        2 , scancode:        2
[   16.410847] report data: key_val :      63 transfer_code:        2 
[   16.417921] key up 
[   16.852411] key down
[   16.865815] report data: key_val :       7 transfer_code:      255 , scancode:        1
[   16.892705] report data: key_val :       7 transfer_code:        1 , scancode:        1
[   16.919527] report data: key_val :       7 transfer_code:        1 , scancode:        1
[   16.959706] report data: key_val :      63 transfer_code:        1 
[   16.966763] key up 
[   17.575221] key down
[   17.588669] report data: key_val :       7 transfer_code:      255 , scancode:        1
[   17.615507] report data: key_val :       7 transfer_code:        1 , scancode:        1
[   17.642386] report data: key_val :       7 transfer_code:        1 , scancode:        1
[   17.669211] report data: key_val :       7 transfer_code:        1 , scancode:        1
[   17.678124] report data: key_val :       7 transfer_code:        1 
[   17.685165] key up 
[   17.843348] key down
[   17.856765] report data: key_val :       7 transfer_code:      255 , scancode:        1
[   17.883631] report data: key_val :       7 transfer_code:        1 , scancode:        1
[   17.910482] report data: key_val :       7 transfer_code:        1 , scancode:        1
[   17.937308] report data: key_val :      63 transfer_code:        1 
[   17.944389] key up 
[   18.057853] key down
[   18.071253] report data: key_val :       7 transfer_code:      255 , scancode:        1
[   18.098114] report data: key_val :       7 transfer_code:        1 , scancode:        1
[   18.138329] report data: key_val :      63 transfer_code:        1 
[   18.145410] key up 
[   18.446212] key down
[   18.459637] report data: key_val :      14 transfer_code:      255 , scancode:        2
[   18.486484] report data: key_val :      14 transfer_code:        2 , scancode:        2
[   18.513351] report data: key_val :      14 transfer_code:        2 , scancode:        2
[   18.553551] report data: key_val :      63 transfer_code:        2 
[   18.560625] key up 
[   18.687472] key down
[   18.700914] report data: key_val :      14 transfer_code:      255 , scancode:        2
[   18.727758] report data: key_val :      14 transfer_code:        2 , scancode:        2
[   18.754610] report data: key_val :      14 transfer_code:        2 , scancode:        2
[   18.794839] report data: key_val :      63 transfer_code:        2 
[   18.801915] key up 
[   19.651305] key down
[   19.664763] report data: key_val :      20 transfer_code:      255 , scancode:        3
[   19.691636] report data: key_val :      20 transfer_code:        3 , scancode:        3
[   19.718463] report data: key_val :      20 transfer_code:        3 , scancode:        3
[   19.745320] report data: key_val :      20 transfer_code:        3 , scancode:        3
[   19.785539] report data: key_val :      63 transfer_code:        3 
[   19.792621] key up 
[   20.066696] key down
[   20.080092] report data: key_val :      26 transfer_code:      255 , scancode:        4
[   20.106950] report data: key_val :      25 transfer_code:        4 , scancode:        3
[   20.187309] report data: key_val :      63 transfer_code:        3 
[   20.194395] key up 
[   20.401542] key down
[   20.495201] key up 
[   20.615691] key down
[   20.682554] key up 
[   20.829802] key down
[   20.843217] report data: key_val :      26 transfer_code:      255 , scancode:        4
[   20.896804] report data: key_val :      26 transfer_code:        4 , scancode:        4
[   20.923671] report data: key_val :      63 transfer_code:        4 
[   20.930664] key up 
[   21.325104] key down
[   21.338509] report data: key_val :      25 transfer_code:      255 , scancode:        3
[   21.365357] report data: key_val :      25 transfer_code:        3 , scancode:        3
[   21.418933] report data: key_val :      26 transfer_code:        3 , scancode:        4
[   21.445764] report data: key_val :      63 transfer_code:        4 
[   21.452763] key up 
[   21.686708] key down
[   21.700164] report data: key_val :      25 transfer_code:      255 , scancode:        3
[   21.780491] report data: key_val :      26 transfer_code:        3 , scancode:        4
[   21.807351] report data: key_val :      63 transfer_code:        4 
[   21.814346] key up 
[   21.927859] key down
[   21.941271] report data: key_val :      26 transfer_code:      255 , scancode:        4
[   22.008244] report data: key_val :      63 transfer_code:        4 
[   22.015243] key up 
[   22.128762] key down
[   22.209025] key up 
[   22.530240] key down
[   22.543658] report data: key_val :      26 transfer_code:      255 , scancode:        4
[   22.597247] report data: key_val :      26 transfer_code:        4 , scancode:        4
[   22.624134] report data: key_val :      26 transfer_code:        4 , scancode:        4
[   22.637543] report data: key_val :      58 transfer_code:        4 
[   22.644519] key up 
[   22.731319] key down
[   22.744759] report data: key_val :      26 transfer_code:      255 , scancode:        4
[   22.771637] report data: key_val :      25 transfer_code:        4 , scancode:        3
[   22.798443] report data: key_val :      26 transfer_code:        3 , scancode:        4
[   22.838693] report data: key_val :      63 transfer_code:        4 
[   22.845688] key up 

离线

#4 2018-09-25 22:45:56

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: 荔枝派nano的按键能用吗?

不错, 围观.





离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn