diff --git a/tool/plugin/plugin_adc128.sh b/tool/plugin/plugin_adc128.sh index 6eb936b..1b577ab 100644 --- a/tool/plugin/plugin_adc128.sh +++ b/tool/plugin/plugin_adc128.sh @@ -1,5 +1,14 @@ #!/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 # @Param 1 adc128 data high 8bit # @Param 2 adc128 data low 8bit @@ -30,5 +39,15 @@ convert_adc128_data(){ echo "$3 : $format_volt v, hex value: $upper_hex_value" } -# E.G. convert_adc128_data 0x08 0x20 "3V3" "1" -convert_adc128_data $1 $2 $3 $4 \ No newline at end of file +read_adc128_data(){ + +} + +case "${mode}" in + "read") + read_adc128_data + ;; + *) + $fmt_print "console" "Error" "[plugin_adc128]Unexpected Input Param : $mode" + ;; +esac \ No newline at end of file diff --git a/tool/plugin/plugin_emc1413.sh b/tool/plugin/plugin_emc1413.sh index 6a7f011..4cd9244 100644 --- a/tool/plugin/plugin_emc1413.sh +++ b/tool/plugin/plugin_emc1413.sh @@ -1,5 +1,14 @@ #!/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 # @Param2 emc1413 data low 8bit # @Param3 customization channel name @@ -42,4 +51,15 @@ convert_emc1413_data(){ } -convert_emc1413_data $1 $2 $3 \ No newline at end of file +read_emc1413_data(){ + +} + +case "${mode}" in + "read") + read_emc1413_data + ;; + *) + $fmt_print "console" "Error" "[plugin_emc1413]Unexpected Input Param : $mode" + ;; +esac \ No newline at end of file diff --git a/tool/plugin/plugin_ina3221.sh b/tool/plugin/plugin_ina3221.sh index 7cc124c..a1d08f7 100644 --- a/tool/plugin/plugin_ina3221.sh +++ b/tool/plugin/plugin_ina3221.sh @@ -1,5 +1,14 @@ #!/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 # @Param2 ina3221 data high 8bit # @Param3 channel number @@ -76,4 +85,15 @@ convert_ina3221_data(){ fi } -convert_ina3221_data $1 $2 $3 $4 $5 $6 \ No newline at end of file +read_ina3221_data(){ + +} + +case "${mode}" in + "read") + read_ina3221_data + ;; + *) + $fmt_print "console" "Error" "[plugin_ina3221]Unexpected Input Param : $mode" + ;; +esac \ No newline at end of file diff --git a/tool/plugin/plugin_tmp468.sh b/tool/plugin/plugin_tmp468.sh index b80b96a..c18350f 100644 --- a/tool/plugin/plugin_tmp468.sh +++ b/tool/plugin/plugin_tmp468.sh @@ -1,5 +1,14 @@ #!/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 # @Param2 tmp468 data high 8bit # @Param3 customization channel name @@ -26,4 +35,15 @@ convert_tmp468_data(){ echo "$3 : $temp " } - convert_tmp468_data $1 $2 $3 \ No newline at end of file +read_tmp468_data(){ + +} + +case "${mode}" in + "read") + read_tmp468_data + ;; + *) + $fmt_print "console" "Error" "[plugin_tmp468]Unexpected Input Param : $mode" + ;; +esac \ No newline at end of file