X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fzeroplus-logic-cube%2Fprotocol.c;h=bbccc6fd238cea5ee93c673973b8656902a929c0;hb=f336618c3d1dc766da1c9f8ba46b322de9c746fa;hp=92bb32bf11e3b65ef8ac70329c4c8ae1e67fa137;hpb=e495a676ebda71cdcc39904ee28174ccba7ce2ae;p=libsigrok.git diff --git a/hardware/zeroplus-logic-cube/protocol.c b/hardware/zeroplus-logic-cube/protocol.c index 92bb32bf..bbccc6fd 100644 --- a/hardware/zeroplus-logic-cube/protocol.c +++ b/hardware/zeroplus-logic-cube/protocol.c @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the libsigrok project. * * Copyright (C) 2010-2012 Bert Vermeulen * @@ -33,33 +33,6 @@ SR_PRIV unsigned int get_memory_size(int type) return 0; } -SR_PRIV int zp_set_samplerate(struct dev_context *devc, uint64_t samplerate) -{ - int i; - - for (i = 0; zp_supported_samplerates[i]; i++) - if (samplerate == zp_supported_samplerates[i]) - break; - - if (!zp_supported_samplerates[i] || samplerate > devc->max_samplerate) { - sr_err("Unsupported samplerate: %" PRIu64 "Hz.", samplerate); - return SR_ERR_ARG; - } - - sr_info("Setting samplerate to %" PRIu64 "Hz.", samplerate); - - if (samplerate >= SR_MHZ(1)) - analyzer_set_freq(samplerate / SR_MHZ(1), FREQ_SCALE_MHZ); - else if (samplerate >= SR_KHZ(1)) - analyzer_set_freq(samplerate / SR_KHZ(1), FREQ_SCALE_KHZ); - else - analyzer_set_freq(samplerate, FREQ_SCALE_HZ); - - devc->cur_samplerate = samplerate; - - return SR_OK; -} - SR_PRIV int set_limit_samples(struct dev_context *devc, uint64_t samples) { devc->limit_samples = samples;