feat(plugin : scripts)添加基本I2C功能脚本
This commit is contained in:
parent
369c31b639
commit
73d92cbb61
9
tool/plugin/i2c_m6.sh
Normal file
9
tool/plugin/i2c_m6.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
i2c_bus=$1
|
||||||
|
wc=$2
|
||||||
|
slave=$3
|
||||||
|
data=$4
|
||||||
|
rc=$5
|
||||||
|
|
||||||
|
i2c_test -b $i2c_bus -s $slave -rc $rc -d $data | awk 'NR==3{for(i=1;i<=NF;i++){printf("0x%s ",$i)}}'
|
||||||
9
tool/plugin/i2c_m7.sh
Normal file
9
tool/plugin/i2c_m7.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
i2c_bus=$1
|
||||||
|
wc=$2
|
||||||
|
slave=$3
|
||||||
|
data=$4
|
||||||
|
rc=$5
|
||||||
|
|
||||||
|
i2ctransfer - y $i2c_bus w$wc@$slave $data r$5
|
||||||
Loading…
Reference in New Issue
Block a user