⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parse.pl

📁 华邦的W996[78]cf芯片组的摄象头驱动程序
💻 PL
字号:
#!/usr/bin/perl# Short perl script to produce a useful kernel code for the testing of the # winbond_9967cf driver for linux.# It require as input the data processed by sniff2mod by David Gouchard # (david@fairesuvre.fr, http://www.laas.fr/~gauchard) Thanks David!!!# Use:# cat sniff2mod_data | ./parse.pl# by Raffaele Spangaro <keatch@f2s.com># http://www.keatch.f2.comprint "short reg_value;\n\n";while (<>) {  chomp;  @values=split(/,/,$_);  $values[3] =~ /W9968_SET_REG/ &&     printf("if(w9967cf_reg_set(cam->dev,%s,%s)<0) return -1;\n",$values[5],$values[4]);  $values[3] =~ /W9968_GET_REG/ &&      printf("if(w9967cf_reg_get(cam->dev,%s,&reg_value)<0) return -1;\n",$values[5]);    if ($values[0] =~ /(usb_set)/ ) {    $_ = $values[2]; s/\)\);//g;    printf("if(usb_set_interface(cam->dev,0,%s)<0) return -1;\n",$_);  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -