code sync
This commit is contained in:
parent
7393c6bfb4
commit
576d831af1
@ -1,5 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
mode=$1
|
||||||
|
i2c_bus=$2
|
||||||
|
chip_slave=$3
|
||||||
|
server_platform=$4
|
||||||
|
|
||||||
|
path=`pwd`
|
||||||
|
fmt_print="${path}/format_print.sh"
|
||||||
|
i2c_script="${path}/i2c_${server_platform}.sh"
|
||||||
|
|
||||||
# process sensor data then print to console
|
# process sensor data then print to console
|
||||||
# @Param 1 adc128 data high 8bit
|
# @Param 1 adc128 data high 8bit
|
||||||
# @Param 2 adc128 data low 8bit
|
# @Param 2 adc128 data low 8bit
|
||||||
@ -30,5 +39,15 @@ convert_adc128_data(){
|
|||||||
echo "$3 : $format_volt v, hex value: $upper_hex_value"
|
echo "$3 : $format_volt v, hex value: $upper_hex_value"
|
||||||
}
|
}
|
||||||
|
|
||||||
# E.G. convert_adc128_data 0x08 0x20 "3V3" "1"
|
read_adc128_data(){
|
||||||
convert_adc128_data $1 $2 $3 $4
|
|
||||||
|
}
|
||||||
|
|
||||||
|
case "${mode}" in
|
||||||
|
"read")
|
||||||
|
read_adc128_data
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
$fmt_print "console" "Error" "[plugin_adc128]Unexpected Input Param : $mode"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@ -1,5 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
mode=$1
|
||||||
|
i2c_bus=$2
|
||||||
|
chip_slave=$3
|
||||||
|
server_platform=$4
|
||||||
|
|
||||||
|
path=`pwd`
|
||||||
|
fmt_print="${path}/format_print.sh"
|
||||||
|
i2c_script="${path}/i2c_${server_platform}.sh"
|
||||||
|
|
||||||
# @Param1 emc1413 data high 8bit
|
# @Param1 emc1413 data high 8bit
|
||||||
# @Param2 emc1413 data low 8bit
|
# @Param2 emc1413 data low 8bit
|
||||||
# @Param3 customization channel name
|
# @Param3 customization channel name
|
||||||
@ -42,4 +51,15 @@ convert_emc1413_data(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
convert_emc1413_data $1 $2 $3
|
read_emc1413_data(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
case "${mode}" in
|
||||||
|
"read")
|
||||||
|
read_emc1413_data
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
$fmt_print "console" "Error" "[plugin_emc1413]Unexpected Input Param : $mode"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@ -1,5 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
mode=$1
|
||||||
|
i2c_bus=$2
|
||||||
|
chip_slave=$3
|
||||||
|
server_platform=$4
|
||||||
|
|
||||||
|
path=`pwd`
|
||||||
|
fmt_print="${path}/format_print.sh"
|
||||||
|
i2c_script="${path}/i2c_${server_platform}.sh"
|
||||||
|
|
||||||
# @Param1 ina3221 data high 8bit
|
# @Param1 ina3221 data high 8bit
|
||||||
# @Param2 ina3221 data high 8bit
|
# @Param2 ina3221 data high 8bit
|
||||||
# @Param3 channel number
|
# @Param3 channel number
|
||||||
@ -76,4 +85,15 @@ convert_ina3221_data(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
convert_ina3221_data $1 $2 $3 $4 $5 $6
|
read_ina3221_data(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
case "${mode}" in
|
||||||
|
"read")
|
||||||
|
read_ina3221_data
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
$fmt_print "console" "Error" "[plugin_ina3221]Unexpected Input Param : $mode"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@ -1,5 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
mode=$1
|
||||||
|
i2c_bus=$2
|
||||||
|
chip_slave=$3
|
||||||
|
server_platform=$4
|
||||||
|
|
||||||
|
path=`pwd`
|
||||||
|
fmt_print="${path}/format_print.sh"
|
||||||
|
i2c_script="${path}/i2c_${server_platform}.sh"
|
||||||
|
|
||||||
# @Param1 tmp468 data high 8bit
|
# @Param1 tmp468 data high 8bit
|
||||||
# @Param2 tmp468 data high 8bit
|
# @Param2 tmp468 data high 8bit
|
||||||
# @Param3 customization channel name
|
# @Param3 customization channel name
|
||||||
@ -26,4 +35,15 @@ convert_tmp468_data(){
|
|||||||
echo "$3 : $temp "
|
echo "$3 : $temp "
|
||||||
}
|
}
|
||||||
|
|
||||||
convert_tmp468_data $1 $2 $3
|
read_tmp468_data(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
case "${mode}" in
|
||||||
|
"read")
|
||||||
|
read_tmp468_data
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
$fmt_print "console" "Error" "[plugin_tmp468]Unexpected Input Param : $mode"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
Loading…
Reference in New Issue
Block a user