From: Martin Ling Date: Sun, 1 Mar 2015 14:26:54 +0000 (+0000) Subject: Rename SR_CONF_NUM_TIMEBASE to SR_CONF_NUM_HDIV. X-Git-Tag: libsigrok-0.4.0~610 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=bf622e6d00e7985e36a0ddb643e2bf05d66679a6;p=libsigrok.git Rename SR_CONF_NUM_TIMEBASE to SR_CONF_NUM_HDIV. --- diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h index 1483b08e..662e986e 100644 --- a/include/libsigrok/libsigrok.h +++ b/include/libsigrok/libsigrok.h @@ -706,8 +706,8 @@ enum sr_configkey { /** The device supports setting its sample interval, in ms. */ SR_CONF_SAMPLE_INTERVAL, - /** Number of timebases, as related to SR_CONF_TIMEBASE. */ - SR_CONF_NUM_TIMEBASE, + /** Number of horizontal divisions, as related to SR_CONF_TIMEBASE. */ + SR_CONF_NUM_HDIV, /** Number of vertical divisions, as related to SR_CONF_VDIV. */ SR_CONF_NUM_VDIV, diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c index 8f27669f..77feac86 100644 --- a/src/hardware/hameg-hmo/api.c +++ b/src/hardware/hameg-hmo/api.c @@ -221,7 +221,7 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s state = devc->model_state; switch (key) { - case SR_CONF_NUM_TIMEBASE: + case SR_CONF_NUM_HDIV: *data = g_variant_new_int32(model->num_xdivs); ret = SR_OK; break; diff --git a/src/hardware/hameg-hmo/protocol.c b/src/hardware/hameg-hmo/protocol.c index 9487bac4..28c9fd61 100644 --- a/src/hardware/hameg-hmo/protocol.c +++ b/src/hardware/hameg-hmo/protocol.c @@ -50,7 +50,7 @@ static const uint32_t hmo_devopts[] = { SR_CONF_LIMIT_FRAMES | SR_CONF_GET | SR_CONF_SET, SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, - SR_CONF_NUM_TIMEBASE | SR_CONF_GET, + SR_CONF_NUM_HDIV | SR_CONF_GET, SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_GET | SR_CONF_SET, SR_CONF_SAMPLERATE | SR_CONF_GET, diff --git a/src/hardware/hantek-dso/api.c b/src/hardware/hantek-dso/api.c index efd36853..d375c2aa 100644 --- a/src/hardware/hantek-dso/api.c +++ b/src/hardware/hantek-dso/api.c @@ -57,7 +57,7 @@ static const uint32_t devopts[] = { SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET, SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_GET | SR_CONF_SET, - SR_CONF_NUM_TIMEBASE | SR_CONF_GET, + SR_CONF_NUM_HDIV | SR_CONF_GET, SR_CONF_NUM_VDIV | SR_CONF_GET, }; @@ -439,7 +439,7 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s (void)cg; switch (key) { - case SR_CONF_NUM_TIMEBASE: + case SR_CONF_NUM_HDIV: *data = g_variant_new_int32(NUM_TIMEBASE); break; case SR_CONF_NUM_VDIV: diff --git a/src/hardware/rigol-ds/api.c b/src/hardware/rigol-ds/api.c index 38aadf43..a8f8bcde 100644 --- a/src/hardware/rigol-ds/api.c +++ b/src/hardware/rigol-ds/api.c @@ -41,7 +41,7 @@ static const uint32_t devopts[] = { SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_SET, - SR_CONF_NUM_TIMEBASE | SR_CONF_GET, + SR_CONF_NUM_HDIV | SR_CONF_GET, SR_CONF_SAMPLERATE | SR_CONF_GET, }; @@ -529,7 +529,7 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s } switch (key) { - case SR_CONF_NUM_TIMEBASE: + case SR_CONF_NUM_HDIV: *data = g_variant_new_int32(devc->model->series->num_horizontal_divs); break; case SR_CONF_NUM_VDIV: diff --git a/src/hardware/yokogawa-dlm/api.c b/src/hardware/yokogawa-dlm/api.c index b4a1305b..27957406 100644 --- a/src/hardware/yokogawa-dlm/api.c +++ b/src/hardware/yokogawa-dlm/api.c @@ -218,7 +218,7 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s state = devc->model_state; switch (key) { - case SR_CONF_NUM_TIMEBASE: + case SR_CONF_NUM_HDIV: *data = g_variant_new_int32(model->num_xdivs); ret = SR_OK; break; diff --git a/src/hardware/yokogawa-dlm/protocol.c b/src/hardware/yokogawa-dlm/protocol.c index 5dc03194..9f5daf1c 100644 --- a/src/hardware/yokogawa-dlm/protocol.c +++ b/src/hardware/yokogawa-dlm/protocol.c @@ -33,7 +33,7 @@ static const uint32_t dlm_devopts[] = { SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, - SR_CONF_NUM_TIMEBASE | SR_CONF_GET, + SR_CONF_NUM_HDIV | SR_CONF_GET, SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_GET | SR_CONF_SET, }; diff --git a/src/hwdriver.c b/src/hwdriver.c index 17092206..b1e0c3e6 100644 --- a/src/hwdriver.c +++ b/src/hwdriver.c @@ -101,8 +101,8 @@ static struct sr_config_info sr_config_info_data[] = { "Trigger matches", NULL}, {SR_CONF_SAMPLE_INTERVAL, SR_T_UINT64, "sample_interval", "Sample interval", NULL}, - {SR_CONF_NUM_TIMEBASE, SR_T_INT32, "num_timebase", - "Number of time bases", NULL}, + {SR_CONF_NUM_HDIV, SR_T_INT32, "num_hdiv", + "Number of horizontal divisions", NULL}, {SR_CONF_NUM_VDIV, SR_T_INT32, "num_vdiv", "Number of vertical divisions", NULL}, {SR_CONF_SPL_WEIGHT_FREQ, SR_T_STRING, "spl_weight_freq",