X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fzeroplus-logic-cube%2Fzeroplus.c;h=eef93cbfe265e592f187c578105484886f5873c9;hb=921e753f7e2bef9590b1e344200b736a0faa18cc;hp=58b2cc1d99a1dd08150dcab49fc068cf9de322a5;hpb=9a5c6dcf498b8dfebb8beb848ee6db6b59b173e5;p=libsigrok.git diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index 58b2cc1d..eef93cbf 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -340,7 +340,6 @@ static int hw_opendev(int device_index) } analyzer_reset(sdi->usb->devhdl); analyzer_initialize(sdi->usb->devhdl); - analyzer_configure(sdi->usb->devhdl); analyzer_set_memory_size(MEMORY_SIZE_512K); // analyzer_set_freq(g_freq, g_freq_scale); @@ -444,7 +443,7 @@ static int *hw_get_capabilities(void) /* TODO: This will set the same samplerate for all devices. */ static int set_configuration_samplerate(uint64_t samplerate) { - g_message("%s(%llu)", __FUNCTION__, samplerate); + g_message("%s(%" PRIu64 ")", __FUNCTION__, samplerate); if (samplerate > MHZ(1)) analyzer_set_freq(samplerate / MHZ(1), FREQ_SCALE_MHZ); else if (samplerate > KHZ(1)) @@ -472,7 +471,8 @@ static int hw_set_configuration(int device_index, int capability, void *value) case HWCAP_PROBECONFIG: return configure_probes((GSList *) value); case HWCAP_LIMIT_SAMPLES: - limit_samples = strtoull(value, NULL, 10); + tmp_u64 = value; + limit_samples = *tmp_u64; return SIGROK_OK; default: return SIGROK_ERR; @@ -491,6 +491,9 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id) if (!(sdi = get_sigrok_device_instance(device_instances, device_index))) return SIGROK_ERR; + /* push configured settings to device */ + analyzer_configure(sdi->usb->devhdl); + analyzer_start(sdi->usb->devhdl); g_message("Waiting for data"); analyzer_wait_data(sdi->usb->devhdl); @@ -525,8 +528,9 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id) PACKET_SIZE, res); #endif - packet.type = DF_LOGIC32; + packet.type = DF_LOGIC; packet.length = PACKET_SIZE; + packet.unitsize = 4; packet.payload = buf; session_bus(session_device_id, &packet); }