From 7e93eb00228e9cdb9266ea8fdc67a1337ed79cd5 Mon Sep 17 00:00:00 2001 From: Missing Date: Mon, 21 Oct 2024 11:36:45 +0800 Subject: [PATCH] =?UTF-8?q?fix=20(=20script=20:=20nicsensor.sh=20)=20fix?= =?UTF-8?q?=20version=20to=201.2=20Intest=20Rev2=201.=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=B3=A8=E9=87=8A=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 02.nicsensor/nicsensor.sh | 14 +++++++++++++- 02.nicsensor/readme.txt | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/02.nicsensor/nicsensor.sh b/02.nicsensor/nicsensor.sh index d38d89c..08ffb1b 100644 --- a/02.nicsensor/nicsensor.sh +++ b/02.nicsensor/nicsensor.sh @@ -50,8 +50,16 @@ server_type="5280m7" # Common Varible (请勿随意修改) # --------------------------------------------------------- # Input Param +# Introduction of pcie_slot +# 1.脚本即将访问的网卡位于服务器上的PCIe插槽位置 pcie_slot=$1 + +# Introduction of sensor_type +# 1.脚本即将读取和处理的传感器名称 sensor_type=$2 + +# Introduction of chip_slave +# 1.chip i2c slave address(7bit) chip_slave=$3 # Introduction of option_data @@ -126,7 +134,7 @@ ina3221_ch2_volt="0" ina3221_ch0_current="0" ina3221_ch1_current="0" ina3221_ch2_current="0" -SCRIPT_VRESION="1.2 InTest Rev1" +SCRIPT_VRESION="1.2 InTest Rev2" fru_file_name=$option_data2 fru_write_size=0 @@ -147,6 +155,10 @@ print_usage(){ echo " [slave] : chip slave address , please provide 7 bit address" echo " E.G. : ./nicsensor.sh 0 adc128 0x1f" echo "" + echo " To Auto detect i2c slave on server, please use:" + echo " ./nicsensor.sh detect" + echo " This function now only support on server 5280m7, 5468m7, donghu" + echo "" echo " If want to read/write chip register, use the below format" echo " ./nicsensor.sh [slot] chip [slave] [i2c_command]" echo " i2c_command : such as [i2ctransfer -y 13 w1@0x10 0x00 r2]" diff --git a/02.nicsensor/readme.txt b/02.nicsensor/readme.txt index 56b159c..a231dcd 100644 --- a/02.nicsensor/readme.txt +++ b/02.nicsensor/readme.txt @@ -64,7 +64,7 @@ 1.5、DEBUG模式 - 可通过配置脚本中的 DEBUG_MODE 变量(In Srcipt Line:104)来使用debug模式,在debug模式下,不会执行选通 + 可通过配置脚本中的 DEBUG_MODE 变量(In Srcipt Line:112)来使用debug模式,在debug模式下,不会执行选通 9641,9548的操作,仅执行读取传感器的操作,因此启用debug模式后需要手动配置的变量有: i2c_bus