Bootstrap

049_小驰私房菜_MTK Camera debug,通过adb 命令读写Camera sensor寄存器地址的值

一、读取/写入 某个寄存器地址的值

设备先adb root

1)读取寄存器地址的值

/proc/driver # echo "0x0a34" > camsensor && dmesg |grep -i a34

2)往寄存器地址写值

/proc/driver # echo "0x3304 0x66” > camsensor && dmesg |grep -i 3304

操作示例打印:
​
XXX:/proc/driver # echo "0x3304 0x66" > camsensor && dmesg |grep -i 3304
[  361.519092] (1)[3166:sh]write_cmos_sensor 3304
[  361.519351] (1)[3166:sh]read_cmos_sensor 3304
[  361.519369] (1)[3166:sh][imgsensor]---xixi-test,write addr = 0x00003304, data = 0x00000066

调试读写操作,对应驱动代码打印:

 case SENSOR_FEATURE_SET_REGISTER:
  
;