]> sigrok.org Git - libsigrok.git/commitdiff
link-mso19: Remove update function mso_update_logic_threshold_value
authorPaul Kasemir <redacted>
Mon, 12 Dec 2022 18:54:25 +0000 (11:54 -0700)
committerSoeren Apel <redacted>
Wed, 16 Oct 2024 22:09:17 +0000 (00:09 +0200)
src/hardware/link-mso19/api.c

index 04a5b1a9d03e306eb0814baf70659fa9b74a6e1e..8d0876437ca2ce9346e1fde228a0c87030c0d212 100644 (file)
@@ -182,11 +182,6 @@ static void mso_update_trigger_pos(struct dev_context *devc)
                devc->ctltrig_pos |= sign_bit;
 }
 
-static void mso_update_logic_threshold_value(struct dev_context *devc)
-{
-       devc->logic_threshold_value = logic_threshold_values[devc->logic_threshold];
-}
-
 static void mso_update_offset_value(struct dev_context *devc)
 {
        double scaled_value = devc->dso_offset / devc->dso_probe_factor;
@@ -251,7 +246,7 @@ static GSList* scan_handle_port(GSList *devices, struct sp_port *port)
        devc->dso_probe_factor = 10;
        devc->limit_samples = MSO_NUM_SAMPLES;
        devc->logic_threshold = ARRAY_SIZE(logic_thresholds) - 1; // 3.3V/5V
-       mso_update_logic_threshold_value(devc);
+       devc->logic_threshold_value = logic_threshold_values[devc->logic_threshold];
        mso_update_offset_value(devc);
 
        devc->protocol_trigger.spimode = 0;
@@ -524,7 +519,8 @@ static int config_set(uint32_t key, GVariant *data,
                if (idx < 0)
                        return SR_ERR_ARG;
                devc->logic_threshold = idx;
-               mso_update_logic_threshold_value(devc);
+               devc->logic_threshold_value =
+                       logic_threshold_values[devc->logic_threshold];
                break;
        default:
                return SR_ERR_NA;