imx6 電容屏引數更改

2021-09-08 18:19:52 字數 1771 閱讀 5971

imx6使用電容屏時需要獲取對應的usb的event。其中用到了shell的一些命令。分析如下。

# inputcheckline=`cat /proc/bus/input/devices | grep -n "

vendor=0eef

" | grep "

product=0020 version=0001

"| awk -f: ''`

# touchevent=`sed -n "

$(($+5))p

" /proc/bus/input/devices | grep -o "

event."`

inputcheckline=`cat /proc/bus/input/devices | grep -n "

ar1020 touchscreen

" | awk -f: ''`

touchevent=`sed -n "

$(($+4))p

" /proc/bus/input/devices | grep -o "

event."`

root@freescale ~$ cat /proc/bus/input/devices

i: bus=0019 vendor=0001 product=0001 version=0100

n: name="

gpio-keys

"p: phys=gpio-keys/input0

s: sysfs=/devices/platform/gpio-keys/input/input0

u: uniq=h: handlers=kbd event0

b: prop=0

b: ev=3

b: key=10000000

0i: bus=0000 vendor=0000 product=0000 version=0000

n: name="

ar1020 touchscreen

"p: phys=s: sysfs=/devices/virtual/input/input1

u: uniq=h: handlers=cpufreq_interactive mouse0 event1

b: prop=0

b: ev=b

b: key=40000

0000

0000

b: abs=3

......

grep -n匹配並列印行號

root@freescale ~$ cat /proc/bus/input/devices | grep -n "

ar1020 touchscreen

"12:n: name="

ar1020 touchscreen

"這樣獲得了ar1020 touchscreen所在的行。所需要的event1在16行

root@freescale ~$ sed -n "

16p" /proc/bus/input/devices

h: handlers=cpufreq_interactive mouse0 event1

root@freescale ~$ sed -n "

16p" /proc/bus/input/devices | grep -o "

event.

"event1

sed -n : 不輸出到終端

sed

'16p

': 列印第16行

grep -o : only match

imx6 移植人臉識別

最近接到任務要移植人臉檢測,其他步驟網上都有,一步步做就好了,就是在載入haarcascade frontalface alt2.xml的時候,出現 root dchip linux qt opencv 2.4.13.1 modules core src persistence.cpp 5008 e...

IMX6清空framebuffer操作

static void fb clear int fb unsigned char fb mem fb open dev fb0 o rdwr fb mem mmap null,1920 720,prot read prot write,map shared,fb,0 memset fb mem,0...

socat 交叉編譯 imx6

1,為了使用linux虛擬串列埠的功能,選擇移植乙個socat工具。2,設定交叉編譯工具路徑 export path path usr local arm gcc linaro arm linux gnueabihf 4.9 2014.07 linux bin 3,解壓,配置 tar xzvf so...