1、
void sd5_close_i2c_clk()
{
static int i2c_reseted = 0;
if( !i2c_reseted)
{
i2c_reseted = 1;
printf(">>>>>>>date:%s>>>>>>>disable i2c clk.\n",__DATE__);
WRITE_DEBUG_LOG_TO_SDCARD(">>>>>>>date:%s>>>>>>>disable i2c clk.\n",__DATE__);
/*disable i2c*/
system("devmem 0xc0010014 32 0x0");
usleep(100*1000);
/*pin mux*/
system("cur=$(devmem 0xc00100B0);new=$(($cur|(0x03<<7)));devmem 0xc00100B0 32 $new");
usleep(100*1000);
/*out put*/
system("cur=$(devmem 0xc0070028);new=$(($cur|(0x03<<7)));devmem 0xc0070028 32 $new");
usleep(100*1000);
/*close i2c clk*/
system("cur=$(devmem 0xc0070008);new=$(($cur&(~(0x03<<7))));devmem 0xc0070008 32 $new");
}
else
{
printf("i2c clk has closed.\n");
}
}
${file#*/}:删掉第一个 / 及其左边的字符串:dir1/dir2/dir3/my.file.txt
${file##*/}:删掉最后一个 / 及其左边的字符串:my.file.txt
${file#*.}:删掉第一个 . 及其左边的字符串:file.txt
${file##*.}:删掉最后一个 . 及其左边的字符串:txt
${file%/*}:删掉最后一个 / 及其右边的字符串:/dir1/dir2/dir3
${file%%/*}:删掉第一个 / 及其右边的字符串:(空值)
${file%.*}:删掉最后一个 . 及其右边的字符串:/dir1/dir2/dir3/my.file
${file%%.*}:删掉第一个 . 及其右边的字符串:/dir1/dir2/dir3/my
${file/dir/path}:将第一个dir 替换为path:/path1/dir2/dir3/my.file.txt
${file//dir/path}:将全部dir 替换为 path:/path1/path2/path3/my.file.txt
SENSOR=$(get_sysinfo |grep -m 1 Sensor)
SENSOR=${SENSOR##* }
if [ "${SENSOR}" == "CMOS_SC5035M" ];then
nvtipcd \/lib/modules/4.1.0/extra/misc/nvt_isp/nvt_isp510.ko cfg_path=/usr/isp510_sc5035_day.cfg fps=0 &
elif [ "${SENSOR}" == "CMOS_OV4689M" ];then
nvtipcd \/lib/modules/4.1.0/extra/misc/nvt_isp/nvt_isp510.ko cfg_path=/usr/isp510_ov4689_day.cfg fps=0 &
elif [ "${SENSOR}" == "CMOS_OS05A10M" ];then
nvtipcd \/lib/modules/4.1.0/extra/misc/nvt_isp/nvt_isp510.ko cfg_path=/usr/isp510_os05a10_day.cfg fps=0 &
else
nvtipcd \/lib/modules/4.1.0/extra/misc/nvt_isp/nvt_isp510.ko cfg_path=/usr/isp510_ov4689_day.cfg fps=0 &