栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP

system命令操作寄存器 查找proc中特定字符

PHP 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

system命令操作寄存器 查找proc中特定字符

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__);

system("devmem 0xc0010014 32 0x0");

usleep(100*1000);

system("cur=$(devmem 0xc00100B0);new=$(($cur|(0x03<<7)));devmem 0xc00100B0 32 $new");

usleep(100*1000);

system("cur=$(devmem 0xc0070028);new=$(($cur|(0x03<<7)));devmem 0xc0070028 32 $new");

usleep(100*1000);

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 &

 

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/268874.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号