From: Gerhard Sittig Date: Thu, 28 Sep 2023 10:22:01 +0000 (+0200) Subject: hameg-hmo: separate RTH002 and RTH004 model declarations X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=fe6c928f46e10fb6c0f99700d4c3ed6953cbbbbc;hp=35280a96184cdf8781728a2a315e5d560aaf7654;p=libsigrok.git hameg-hmo: separate RTH002 and RTH004 model declarations Commit 10e6dfd1f921 introduced differing trigger sources for RTH1002 and RTH1004, but shared a single scope_models[] entry with identical data for both devices. Use separate scope_models[] entries for RTH1002 and RTH1004, reference their respective capabilities which differ among models. Move the RTH1004 trigger sources next to RT1002, the declarations appear to not assume a specific order anyway. --- diff --git a/src/hardware/hameg-hmo/protocol.c b/src/hardware/hameg-hmo/protocol.c index 5a2a1d50..f355e2c2 100644 --- a/src/hardware/hameg-hmo/protocol.c +++ b/src/hardware/hameg-hmo/protocol.c @@ -220,6 +220,12 @@ static const char *an2_dig8_isol_trigger_sources[] = { "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7", }; +/* RTH1004 */ +static const char *an4_dig8_isol_trigger_sources[] = { + "CH1", "CH2", "CH3", "CH4", + "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7", +}; + /* HMO Compact4 */ static const char *an4_dig8_trigger_sources[] = { "CH1", "CH2", "CH3", "CH4", @@ -243,12 +249,6 @@ static const char *an4_dig16_sbus_trigger_sources[] = { "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15", }; -/* RTH1004 */ -static const char *an4_dig8_isol_trigger_sources[] = { - "CH1", "CH2", "CH3", "CH4", - "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7", -}; - static const uint64_t timebases[][2] = { /* nanoseconds */ { 1, 1000000000 }, @@ -773,9 +773,48 @@ static struct scope_config scope_models[] = { .scpi_dialect = &rohde_schwarz_log_not_pod_scpi_dialect, }, - /* RTH1002 & RTH1004 are both identified as RTH */ { - .name = {"RTH", NULL}, + .name = {"RTH1002", NULL}, + .analog_channels = 2, + .digital_channels = 8, + + .analog_names = &scope_analog_channel_names, + .digital_names = &scope_digital_channel_names, + + .devopts = &devopts, + .num_devopts = ARRAY_SIZE(devopts), + + .devopts_cg_analog = &devopts_cg_analog, + .num_devopts_cg_analog = ARRAY_SIZE(devopts_cg_analog), + + .devopts_cg_digital = &devopts_cg_digital, + .num_devopts_cg_digital = ARRAY_SIZE(devopts_cg_digital), + + .coupling_options = &coupling_options_rth100x, + .num_coupling_options = ARRAY_SIZE(coupling_options_rth100x), + + .logic_threshold = &logic_threshold, + .num_logic_threshold = ARRAY_SIZE(logic_threshold), + .logic_threshold_for_pod = TRUE, + + .trigger_sources = &an2_dig8_isol_trigger_sources, + .num_trigger_sources = ARRAY_SIZE(an2_dig8_isol_trigger_sources), + + .trigger_slopes = &scope_trigger_slopes, + .num_trigger_slopes = ARRAY_SIZE(scope_trigger_slopes), + + .timebases = &timebases, + .num_timebases = ARRAY_SIZE(timebases), + + .vdivs = &vdivs, + .num_vdivs = ARRAY_SIZE(vdivs), + + .num_ydivs = 8, + + .scpi_dialect = &rohde_schwarz_log_not_pod_scpi_dialect, + }, + { + .name = {"RTH1004", NULL}, .analog_channels = 4, .digital_channels = 8,