chunk = g_try_malloc0(DATASTORE_CHUNKSIZE * (*ds)->ds_unitsize);
if (!chunk) {
- sr_err("ds: %s: chunk malloc failed", __func__);
+ sr_err("ds: %s: chunk malloc failed (ds_unitsize was %u)",
+ __func__, (*ds)->ds_unitsize);
return NULL; /* TODO: SR_ERR_MALLOC later? */
}
#include <assert.h>
#include "analyzer.h"
#include "gl_usb.h"
+#include "sigrok-internal.h"
enum {
HARD_DATA_CHECK_SUM = 0x00,
reg2 = 64;
break;
}
+
+ sr_dbg("zp: Setting samplerate regs (freq=%d, scale=%d): "
+ "reg0: %d, reg1: %d, reg2: %d, reg3: %d.",
+ freq, scale, divisor, reg0, 0x02, reg2);
+
if (gl_reg_write(devh, FREQUENCY_REG0, divisor) < 0)
return -1; /* Divisor maybe? */
/* Construct g_poll()'s array. */
if (!(fds = g_try_malloc(sizeof(GPollFD) * num_sources))) {
- sr_err("session: %s: fds malloc failed", __func__);
+ /* Not enough memory, or num_sources was 0. */
+ sr_err("session: %s: fds malloc failed "
+ "(num_sources was %d).", __func__, num_sources);
return SR_ERR_MALLOC;
}
for (i = 0; i < num_sources; i++) {