X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=hardware%2Fzeroplus-logic-cube%2Fzeroplus.c;h=1c5f2cef0488d128ed0a2a1e30838f14a9aedebe;hb=1924f59f4b788046f5eaf7ef3272a14c79a7c6f3;hp=e12ed6f98a81eb1f924f60854f323240a7a55e9f;hpb=a143e4e5ddb4743867b7578e0599a566c2c82c07;p=libsigrok.git diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index e12ed6f9..1c5f2cef 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -280,7 +280,7 @@ static int hw_init(char *deviceinfo) libusb_device **devlist; int err, devcnt, i; - /* QUICK HACK */ + /* Avoid compiler warnings. */ deviceinfo = deviceinfo; if (libusb_init(&usb_context) != 0) { @@ -443,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)) @@ -512,7 +512,8 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id) gettimeofday(&header.starttime, NULL); header.samplerate = cur_samplerate; header.protocol_id = PROTO_RAW; - header.num_probes = num_channels; + header.num_logic_probes = num_channels; + header.num_analog_probes = 0; session_bus(session_device_id, &packet); buf = g_malloc(PACKET_SIZE); @@ -528,8 +529,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); }