X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Flecroy-xstream%2Fprotocol.c;h=18c02061d4bf020a22e334475f52f361fb906b56;hb=53279f13e4694fcf2aba314baade418941b0bc3e;hp=066bed2f04593d9d60b328d54fa8fbb90a0a8b08;hpb=6d13a46ce0a1483fffb342239ca1b10fa354fca2;p=libsigrok.git diff --git a/src/hardware/lecroy-xstream/protocol.c b/src/hardware/lecroy-xstream/protocol.c index 066bed2f..18c02061 100644 --- a/src/hardware/lecroy-xstream/protocol.c +++ b/src/hardware/lecroy-xstream/protocol.c @@ -74,23 +74,6 @@ struct lecroy_wavedesc { }; } __attribute__((packed)); -static const uint32_t devopts[] = { - SR_CONF_OSCILLOSCOPE, - 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_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, -}; - -static const uint32_t analog_devopts[] = { - SR_CONF_NUM_VDIV | SR_CONF_GET, - SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, - SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, -}; - static const char *coupling_options[] = { "A1M", // AC with 1 MOhm termination "D50", // DC with 50 Ohm termination @@ -200,12 +183,6 @@ static const struct scope_config scope_models[] = { .analog_channels = 4, .analog_names = &scope_analog_channel_names, - .devopts = &devopts, - .num_devopts = ARRAY_SIZE(devopts), - - .analog_devopts = &analog_devopts, - .num_analog_devopts = ARRAY_SIZE(analog_devopts), - .coupling_options = &coupling_options, .trigger_sources = &trigger_sources, .trigger_slopes = &scope_trigger_slopes, @@ -236,8 +213,8 @@ static void scope_state_dump(const struct scope_config *config, tmp, state->analog_channels[i].vertical_offset); } - tmp = sr_period_string(((float)config->timebases[state->timebase].q) / - ((float)config->timebases[state->timebase].p)); + tmp = sr_period_string(config->timebases[state->timebase].p, + config->timebases[state->timebase].q); sr_info("Current timebase: %s", tmp); g_free(tmp); @@ -685,7 +662,7 @@ SR_PRIV int lecroy_xstream_receive_data(int fd, int revents, void *cb_data) * the first enabled channel. */ if (++devc->num_frames == devc->frame_limit) { - sdi->driver->dev_acquisition_stop(sdi); + sr_dev_acquisition_stop(sdi); } else { devc->current_channel = devc->enabled_channels; lecroy_xstream_request_data(sdi);