SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
-unsigned char TESTO_x35_REQUEST[] = { 0x12, 0, 0, 0, 1, 1, 0x55, 0xd1, 0xb7 };
-struct testo_model models[] = {
+static const uint8_t TESTO_x35_REQUEST[] = { 0x12, 0, 0, 0, 1, 1, 0x55, 0xd1, 0xb7 };
+
+static const struct testo_model models[] = {
{ "435", 9, TESTO_x35_REQUEST },
};
devc->limit_msec = g_variant_get_uint64(data);
now = g_get_monotonic_time() / 1000;
devc->end_time = now + devc->limit_msec;
- sr_dbg("Setting time limit to %" PRIu64 "ms.",
- devc->limit_msec);
break;
case SR_CONF_LIMIT_SAMPLES:
devc->limit_samples = g_variant_get_uint64(data);
- sr_dbg("Setting sample limit to %" PRIu64 ".",
- devc->limit_samples);
break;
default:
ret = SR_ERR_NA;
}
-SR_PRIV void receive_transfer(struct libusb_transfer *transfer)
+SR_PRIV void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer)
{
struct dev_context *devc;
struct sr_dev_inst *sdi;
if (testo_request_packet(sdi) != SR_OK)
return SR_ERR;
- buf = g_try_malloc(MAX_REPLY_SIZE);
+ buf = g_malloc(MAX_REPLY_SIZE);
transfer = libusb_alloc_transfer(0);
libusb_fill_bulk_transfer(transfer, usb->devhdl, EP_IN, buf,
MAX_REPLY_SIZE, receive_transfer, (void *)sdi, 100);