diff --git a/02.nicsensor/nicsensor.sh b/02.nicsensor/nicsensor.sh index f20b9e2..bd31f80 100644 --- a/02.nicsensor/nicsensor.sh +++ b/02.nicsensor/nicsensor.sh @@ -943,22 +943,31 @@ start_get_sensor(){ esac } +#@Param1 nic type detect_on_5280m7(){ - i2c_bus=12 - pca9641_slave="0x41" - get_pca9641_control - do_i2c_detect 12 0x72 0x02 1 0 - do_i2c_detect 12 0x72 0x04 2 1 - do_i2c_detect 12 0x72 0x08 3 2 + if [ $1 == "ocp" ];then + i2c_bus=3 + do_i2c_detect 3 0x70 0x01 0 0 + do_i2c_detect 3 0x70 0x02 1 1 + do_i2c_detect 3 0x70 0x04 2 2 + else + i2c_bus=12 + pca9641_slave="0x41" + get_pca9641_control - i2c_bus=13 - pca9641_slave="0x42" - get_pca9641_control - - do_i2c_detect 13 0x72 0x02 1 3 - do_i2c_detect 13 0x72 0x04 2 4 - do_i2c_detect 13 0x72 0x08 3 5 + do_i2c_detect 12 0x72 0x02 1 0 + do_i2c_detect 12 0x72 0x04 2 1 + do_i2c_detect 12 0x72 0x08 3 2 + + i2c_bus=13 + pca9641_slave="0x42" + get_pca9641_control + + do_i2c_detect 13 0x72 0x02 1 3 + do_i2c_detect 13 0x72 0x04 2 4 + do_i2c_detect 13 0x72 0x08 3 5 + fi } detect_on_5468m7(){ @@ -1081,7 +1090,8 @@ if [ "$sensor_type" == "chip" ];then fi if [ "$1" == "detect" ];then - start_detect_device + nic_type=$2 + start_detect_device $nic_type exit 0 fi