2011年9月30日 星期五

imx51 bbg板上做出calibration的retry機制

20110929 20110930:
redmine 516
tag = // add calibration retry function

說明:
整個流程:
debug function
check conf file
get framebuff from video info + access framebuff
get ts device as input device form "/dev/input/event" ("/dev/input/event3: is mxc_ts")
do calibration

1.
該程式是nit.rc裡面"exec /sbin/ts_calibrator"執行的.
\sbin\ts_calibrator
\\192.168.144.239\tony-liao\myandroid\device\fsl\imx5x\init.rc

2.
利用檔案來存放calibration的校正值.
如果程式一開始找不到該檔案,就會進入校正畫面,並把新的校正值寫入,可以讓下次開機的時候使用.
\data\system\calibration

3.
利用video的IOcontrol來獲得display相關的資訊
FBIOGET_VSCREENINFO
FBIOGET_FSCREENINFO
這是video driver的位置
\\192.168.144.239\tony-liao\myandroid\kernel_imx\drivers\video\fbmem.c

動作:

修改:
commit 5907ccdf1c2ace52ee66949688dbe3e8ae5bea56
source code:
\\192.168.144.239\tony-liao\myandroid\system\core\ts_calibrator\ts_calibrator.c
int sx[3], sy[3]; // 這是三組預設的點
#define CALIBRATION_OFFSET 40 // 這是預設的誤差範圍
座標系統 : X軸往左是正 Y軸往下是正

calibration bin file:
\\192.168.144.239\tony-liao\myandroid\out\target\product\CV-7000\root\sbin\ts_calibrator

Device calibration info:
\data\system\calibration
\sbin\ts_calibrator

參考:

ts_calibrator.c這個檔案可以學到很多其他的linux技巧,雖然跟calibration沒有直接關係.

mmap 如何利用memory map的方式來達到快速的file access及PCI share memory的方法
http://lazyflai.blogspot.com/2008/06/linuxmmap.html
http://www.lslnet.com/linux/docs/linux-5064.htm
http://fanqiang.chinaunix.net/a4/b8/20010526/110000243_b.html

stat 查詢檔案的狀態
http://new-acos.blogspot.com/2010/02/linuxprocstatcpu.html
http://blog.csdn.net/xuemiao1234/article/details/5544226

EVIOCGNAME 一個巨集來得到裝置的名稱
http://blog.csdn.net/wzz_momo/article/details/6534175
http://hi.baidu.com/zhouhanqing/blog/item/9d18a3cc16020a580eb3451c.html

va_list va_start va_end va_arg 多重且不定的參數如何處理
http://blog.chinaunix.net/space.php?uid=20696246&do=blog&cuid=1892642
http://hi.baidu.com/grdd/blog/item/f21c05b37ef548a0d8335a41.html
http://blog.chinaunix.net/space.php?uid=20691105&do=blog&cuid=1185545

vsnprintf 使用一個固定size的buffer來接收不定參數的方法
http://topic.csdn.net/u/20090710/16/ae72ae61-3dc9-49eb-bbe8-ce2e1823415e.html
http://www.wretch.cc/blog/shinningball/33081867

附註:

沒有留言:

張貼留言