参考:https://whycan.com/t_2712.html
发现nano没有PB2 PB3 PB4,改用PE4 PE5 PE6,设置menuconfig后执行cat /proc/interrupts,并没有发现matrix key相关中断
# cat /proc/interrupts
CPU0
16: 504 sun4i_irq 13 Edge timer@1c20c00
17: 0 sun4i_irq 18 Edge 1c02000.dma-controller
18: 3 sun4i_irq 10 Edge sun6i-spi
19: 24609 sun4i_irq 11 Edge sun6i-spi
21: 2010 sun4i_irq 23 Edge sunxi-mmc
22: 0 sun4i_irq 26 Edge musb-hdrc.1.auto
27: 79 sun4i_irq 1 Edge ttyS0
64: 1 sunxi_pio_edge 34 Edge usb0-id-det
是不是PE IO组没有中断功能?
离线
目前使用PE4 5作为中断线,开机正确注册
input: soc:my-keypad as /devices/platform/soc/soc:my-keypad/input/input0
cat /proc/interrupts
CPU0
16: 550 sun4i_irq 13 Edge timer@1c20c00
17: 0 sun4i_irq 18 Edge 1c02000.dma-controller
18: 3 sun4i_irq 10 Edge sun6i-spi
19: 0 sun4i_irq 11 Edge sun6i-spi
21: 5901 sun4i_irq 23 Edge sunxi-mmc
27: 207 sun4i_irq 1 Edge ttyS0
66: 0 sunxi_pio_edge 36 Edge matrix-keypad
67: 0 sunxi_pio_edge 37 Edge matrix-keypad
按下按键输出一堆乱码
# cat /dev/input/event0
[?[?[?[?[?[?[?[橻?`?`?`?`?`?
不知是不是码表keymap没对上
离线